Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Joshua-Massey
New Member

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:

JoshuaMassey_0-1657802615023.png

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

 

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Joshua-Massey ,

 

How about this:

tomfox_0-1657803826993.png

 

 

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

5 REPLIES 5
Avantika-Thakur
Solution Supplier
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
tackytechtom
Super User
Super User

Hi @Joshua-Massey ,

 

How about this:

tomfox_0-1657803826993.png

 

 

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

It works! thank you!

amitchandak
Super User
Super User

@Joshua-Massey , You can create a measure distinctcount(Table[ID]) , and use that in visual with status

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

How do I make the measure show the result "Not started" count = 3 ?

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.