Forum Discussion
tejapowerbi123
6 years agoHelper V
Count based on condition
Hi Community, Please review below and provide your suggestion, I want to count organization based on “Decision”, I have used below formula and it not showing right result. Count = COUNTX( FI...
- Anonymous6 years ago
HI tejapowerbi123 ,
Create a Calculated Column
Column = CALCULATE(COUNT(Table2[Decision]),FILTER( ALLEXCEPT(Table2,Table2[Organization]), Table2[Decision] = "Award"))Regards,
Harsh NathaniAppreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
swise001
6 years agoContinued Contributor
tejapowerbi123
6 years agoHelper V
swise001 I have used your suggestion and still not getting right number.
| Count only based on Awarded |
| 1 |
| 1 |
- AntrikshSharma6 years agoCommunity Champion
I replicated your scenario and your measure displays the correct result. Below is the pbix file.
- tejapowerbi1236 years agoHelper V
AntrikshSharma thank you so much.I am trying to create in calculated column and i want to use column result to next formula.
- AntrikshSharma6 years agoCommunity Champion
If it is a calculated column then you can use this. Modify the IF statement as per your requirement.
Column = VAR CurrentOrganization = RawData[Organization] VAR RowsSatisfyingCondition = COUNTROWS ( FILTER ( RawData, RawData[Organization] = CurrentOrganization && RawData[Decision] = "Award" ) ) VAR Result = IF ( RawData[Decision] = "Award", RowsSatisfyingCondition ) RETURN Result