Forum Discussion

Bexpurlz's avatar
Bexpurlz
Regular Visitor
3 years ago
Solved

Question with highest average score

I am trying to create a DAX Measure in Power BI to pull out the question with the highest average score. It's a very simple table, just question, person and score.
 

Any help appreciated

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Bexpurlz This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

    The pattern is:
    MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    etc.

    • Bexpurlz's avatar
      Bexpurlz
      Regular Visitor

      Thank you for the reply, although I'm not sure if it's exactly what I'm after here.

       

      I'm fairly new to dax, so struggling a little bit. I want to create a scorecard, that I will label 'question with highest average score' 

       

      So I'm trying to use your code, but I don't really get the 'your measure' part, I don't have a measure yet so I'm getting a bit confused. I have attached a photo of the dax so far. I appreciate your help. 

      • v-xiaosun-msft's avatar
        v-xiaosun-msft
        Community Support

        Hi Bexpurlz 

         

        Has your problem been solved? If so, would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!

         

        Best Regards,
        Community Support Team _ xiaosun

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.