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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors