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

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

Reply
Anonymous
Not applicable

Count of rows for table visual based on condition and filters

Hey,

I have a visual table in PowerBI that looks something like this but with more data:

Goku100_0-1615865497191.png

I want to count the number of rows for each company where Prime or Not Prime = "Prime"

count prime.PNG

I want this count measure to work with slicers/filters that will be added to the page e.g., If I select "Company A" in the slicer then the KPI for Prime should show a count of 1.

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

Create a measure, then add the supplier column and the measure in a table visual.

measure = Calculate(count([supplier], filter(Table,Table[Prime or Not Prime] = "Prime"))

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 

Create a measure, then add the supplier column and the measure in a table visual.

measure = Calculate(count([supplier], filter(Table,Table[Prime or Not Prime] = "Prime"))

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

 
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

countrows(filter(Table,Table[Prime or Not Prime] = "Prime"))

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.