Search code examples
powerbisummarize

Power BI : Addcolumns and summarize


I'm trying to get the number of vote records depending on the satisfaction of our customers. For example :

  • 20 records voting for 5/10
  • 10 records voting for 2/10
  • 5 records voting for 9/10

This is a part of my dataset : enter image description here

I want to have for each Opp title , the number of records having X votes with X a scale from 1 to 10.

The X is the response of the customer for the How likely would you recommend the experience you lived? as shown in the dataset, in the last column.

I made a new table with this query where I added Flag to know if it's POOR , MEDIUM or High, but I'm not getting the requested result :

Summarize Table = 
ADDCOLUMNS (
    SUMMARIZE(
        NPS_18_7_2018;NPS_18_7_2018[Opp title];
        "Total order"; DISTINCTCOUNT ( NPS_18_7_2018[How likely would you recommend the experience you lived?])
    );
    "Flag"; IF ( [Total order] <= 5; "POOR"; IF ( [Total order] = 5; "Medium"; "High" ) )
)

I'm trying to generate a chart where I can find for the VOTE = 5/10 for example , the number of EP ID who voted 5/10 for each Opp title.

One of the incorrect records I get as a result:

enter image description here


Solution

  • I think this would match your question more closely:

    Summarize Table =
        SUMMARIZE(
            NPS_18_7_2018;
            NPS_18_7_2018[Opp title];
            NPS_18_7_2018[How likely would you recommend the experience you lived?];
            "Votes"; COUNT(NPS_18_7_2018[EP ID])
        )
    

    This groups by title and rating and then count applies the count.