Forum Discussion
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(
FILTER ( 'Raw Data',' Raw Data '[Decision] = "Award" ),
''Raw Data''[organization])
Raw Data | |
Organization | Decision |
ABC | Award |
ABC | Award |
ABC | Decline |
XYZ | Award |
Final Result | ||
Organization | Decision | Count only based on Awarded |
ABC | Award | 2 |
XYZ | Award | 1 |
- 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!
13 Replies
- AnonymousNot applicable
I would use
_Count =
CALCULATE(COUNTX('Raw Data'[organization]), ALLEXCEPT('Raw Data','Raw Data[Decision]))
(OR)
CALCULATE(COUNTROWS('Raw Data'),'Raw Data'[Decision]="Award")
Did I resolve your issue? Mark my post as a solution!
Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit- tejapowerbi123Helper V
Thank you so much Pranit, I have used your suggestion but result is still not right.
Count only based on Awarded 2411 2411 - AnonymousNot applicable
I believe what you are looking for is below:
CALCULATE (
COUNTROWS('Raw Data'),
FILTER ( ALLEXCEPT('Raw Data','Raw Data'[Decision]),'Raw Data'[Decision]="Award")
)Did I resolve your issue? Mark my post as a solution!
Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
- swise001Continued Contributor
- tejapowerbi123Helper V
swise001 I have used your suggestion and still not getting right number.
Count only based on Awarded 1 1 - AntrikshSharmaCommunity Champion
I replicated your scenario and your measure displays the correct result. Below is the pbix file.