Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Final")
CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Initial")
I now wish to create measure the third measure which return all the 'ClientIDs' that have a higher final score.
A bit lost on how to go about it, this is what i currently have which does not work.
Would appreciate any help and advice
CALCULATE( COUNT( 'Client'[ID]) , [Final Score] > [Initial Score] )
Solved! Go to Solution.
Try like
CALCULATE( COUNTX(filter(values( 'Client'[ID]) , [Final Score] > [Initial Score] ), [Client ID] ))
if needed add a filter in these two too
CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Final"))
CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Initial") )
Try like
CALCULATE( COUNTX(filter(values( 'Client'[ID]) , [Final Score] > [Initial Score] ), [Client ID] ))
if needed add a filter in these two too
CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Final"))
CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Initial") )
Thankyou, that works perfectly, are you ok to give a breakdown as to what is happening in the measure, I'm new to DAX so would love to understand more!
We have basically three functions at work here. Separated by colour.
COUNTX(filter(values( 'Client'[ID]) , [Final Score] > [Initial Score] ), [Client ID] ))
Let's break it down from the innermost arguments:
In this we we find the count of 'Client'[ID]) where [Final Score] > [Initial Score].
In case you need to understand in detail each of these functions you can use dax.guide
Hope this helps.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
54 | |
27 | |
23 | |
14 | |
11 |
User | Count |
---|---|
77 | |
63 | |
44 | |
17 | |
12 |