Forum Discussion
CALCULATE filtering table by conditional measure
- 4 years ago
Hi edcdcpowerbi ,
Please try the following formula:
Measure = CALCULATE ( DISTINCTCOUNT ( 'Client'[ID] ), FILTER ( ALLSELECTED ( Client[ID] ), [Final Score] > [Initial Score] ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you can share the details of Initial and Final Score will be better but you can try using the variable
MEASURE=
VAR x1=[Final Score]
VAR x2=[Initial Score]
RETURN
CALCULATE( COUNT( 'Client'[ID]) , x1>x2 )
- edcdcpowerbi4 years ago
Helper I
Thanks for the help. It brings up the same semantic error i was getting in my initial measure unfortunately.
- edcdcpowerbi4 years ago
Helper I
The initial measures are creates with this measure:
CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Final")
CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Initial")
- vikrambasriyar4 years ago
Helper I
Can you check the syntax of your measure. I think its not correct.
- vikrambasriyar4 years ago
Helper I
edcdcpowerbi if you can share the snapshot of your data and required output.
- edcdcpowerbi4 years ago
Helper I
The output i am looking for is all the client IDs who have a higher final score.
I've created two measures which give me total scores for intial and final, now i wish to calculate the client IDs that have a higher final score