Forum Discussion
Count items in column based on condition in another column
Hi all,
I would like to count the number of times phrase occurs in a column, based on a condition in a different column, can this be done?
please see below:
I want to count how many times "Not started" appears in the status column for each distinct ID. So the answer in the example above would be 3, as "Not started" appears at 3 different ID's
Thanks
Hi Joshua-Massey ,
How about this:
Here the DAX measure:
MeasureDistinnctCount = CALCULATE ( DISTINCTCOUNT ( Table54[ID] ), Table54[STATUS] = "Not started" )
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
5 Replies
- tackytechtom
Most Valuable Professional
Hi Joshua-Massey ,
How about this:
Here the DAX measure:
MeasureDistinnctCount = CALCULATE ( DISTINCTCOUNT ( Table54[ID] ), Table54[STATUS] = "Not started" )
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- Joshua-MasseyNew Member
It works! thank you!
- amitchandak
Super User
Joshua-Massey , You can create a measure distinctcount(Table[ID]) , and use that in visual with status
- Joshua-MasseyNew Member
How do I make the measure show the result "Not started" count = 3 ?
- Avantika-Thakur
Solution Supplier
Hi Joshua-Massey ,
Please try using this measure ->
Count of status = CALCULATE(DISTINCTCOUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Status])).Also, please accept the solution if this helps you achieve your results.Thanks!Avantika