Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm trying to write dax to calculate the number of people who went skiing and scored an average of 3 or above. The average is calculated for all tricks. This would mean that Bob = 4.5, Jim = 3, Alan = 4, and Jen = 1. The number of people above a 3 average is 3 people.
For the sample table below, that would be
Unfortunately, my DAX is giving me 4 people, because Bob is being double counted.
DAX I've written:
Skiiers above average of 3 = CALCULATE(DISTINCTCOUNT(Name,
filter('Ski',Average([Score]) >= 3), All([Activity]))
I tried using All([Tricks]) as well & I've tried AllEXCEPT on Tricks and Activity, but I cannot keep Bob from being counted twice.
Could someone please provide me with some insight?
Thanks!
Solved! Go to Solution.
Hi @tasmiaa,
Please try this measure:
Skiiers above average of 3 = CALCULATE ( DISTINCTCOUNT ( [Name] ), FILTER ( 'Ski', CALCULATE ( AVERAGE ( [Score] ), ALLEXCEPT ( ski, ski[Name] ) ) >= 3 ) )
Best regards,
Yuliana Gu
Hi @tasmiaa,
Please try this measure:
Skiiers above average of 3 = CALCULATE ( DISTINCTCOUNT ( [Name] ), FILTER ( 'Ski', CALCULATE ( AVERAGE ( [Score] ), ALLEXCEPT ( ski, ski[Name] ) ) >= 3 ) )
Best regards,
Yuliana Gu
Thank you!
User | Count |
---|---|
90 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
72 | |
60 | |
59 |