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
StuartSmith
Power Participant
Power Participant

Count number of rows in measure output that meet criteria.

I have a measure (Attrition Country KPI) that compares 2 other measures (Attrition & Max Half Yearly Level) and depending on the result, will display various outputs including "KPI Breached".  I need to create a measure that will count the number of "KPI Breached" per region.

 

Can this be done and if so, how?  Thanks in advance.

 

StuartSmith_0-1694972193075.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

This measure will count

=countrows(filter(values(Data[Country]),[Attrition Country KPI]="KPI Breached"))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
StuartSmith
Power Participant
Power Participant

Thanks, I was almost there, was just missing the "Values" bit. Will have a read up on that function.

Ashish_Mathur
Super User
Super User

Hi,

This measure will count

=countrows(filter(values(Data[Country]),[Attrition Country KPI]="KPI Breached"))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.