Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
13 | |
11 | |
8 |