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
jacobtmelton
New Member

COUNTROWS with filtered data

First of all, I'm about as new to this software as can be, so please bear with me. I've got a table "Inventory" with a column "Scope," and have it filtered to not display items with certain values for "Scope." Now, I want to get a count of the rows that fit into this filter, but the COUNTROWS ignores the filter and still gives me a total of all rows. 

 

All this being said, I appreciate any help in advance! 

1 ACCEPTED SOLUTION

Sorry:

Hi:

You can either bring the field Scope into a table oor amtrix visual and drop your  COUNTROWS measure in values field well.

 

Or add a slicer for column scope and select the scope value you want and CountRows should adjust.

Here is example where slicer is Grade and data below in a table.

Whitewater100_0-1647960497569.png

 

View solution in original post

3 REPLIES 3
Whitewater100
Solution Sage
Solution Sage

Hi:

If you are seeking a measure to count specific values under the scope field.

 

Specific Scope = CALCULATE(COUNTROWS(Table[Scope]), Table[Scope] = "Value"))

and repeat for each separate value under scope. e.g. "instock", "intransit"  etc.

Whitewater100
Solution Sage
Solution Sage

Hi:

You can either bring that Field Scope into a table of amtix visual and drop COUNTROWS in values field well.

 

Or add a slicer from scope and select the scope you want and CR should adjust.

 

Hope this helps.

Sorry:

Hi:

You can either bring the field Scope into a table oor amtrix visual and drop your  COUNTROWS measure in values field well.

 

Or add a slicer for column scope and select the scope value you want and CountRows should adjust.

Here is example where slicer is Grade and data below in a table.

Whitewater100_0-1647960497569.png

 

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.