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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
WilliamA
Helper I
Helper I

Row Count measure does not count filters applied at the visual level

Hi all,

 

I have a table with 80 columns. I then have a measure to get the row count of the table.

Row Count = COUNTROWS('Search All')

 

when I use the filter pane to apply a filter, the row count value does not change and displays the original count. However, if I move the filter from "filters on this visual" to "Filters on this page" then the measure gets updated correctly.

 

Given the amount the columns I have and that power bi automatically adds them to the "filters on this visual", I dont want to have to move all filters to "filters on this page" just to get the correct row count.

 

Is there a way to display the row count via a measure that captures any filters applied on the visual level?

1 ACCEPTED SOLUTION

Hi @WilliamA , Thank you for reaching out to the Microsoft Community Forum.

 

The reason your measure doesn’t update when using visual-level filters on a table is that visual-level filters only affect the visual they’re applied to. A card or separate visual won't reflect those filters because Power BI doesn’t share visual-level filter context across visuals. Page-level filters or slicers work because they apply globally, but with 80 columns, slicers aren’t practical and moving filters manually isn’t scalable.

 

Create a matrix visual that mimics the card but exists in the same filter context as your table. Add your Row Count measure to the Values area of a matrix with no rows or columns. Then, in the Filter Pane, copy the same visual-level filters applied to your table and apply them to the matrix. This way, the row count will update correctly based on the filters without needing slicers or page-level changes. You can format the matrix to look like a card by hiding headers and adjusting text size for a clean, simple display.

 

If you prefer, you can also place the measure directly inside the table visual as a column, it will respect the filters and show the correct count per row, though it may be visually repetitive.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

9 REPLIES 9
amitchandak
Super User
Super User

@WilliamA , A visual level filter should apply. I am sure this a measure not calculated column - Row Count = COUNTROWS('Search All')

The visual-level filter will apply to that visual and not to other visuals. At the same time, page page-level filter will apply to all visuals. You can also consider a slicer.

Please share the file after removing the sensitive data to check

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak,  It is not feasible to use a slicer as there is over 80 columns.  here is the sample file.

Sample Data Row Count.pbix

Hi @WilliamA , Thank you for reaching out to the Microsoft Community Forum.

 

Simply define your measure as Row Count = CALCULATE(COUNTROWS('Search All')). This tells Power BI to evaluate the row count within the current filter context, which includes visual-level, page-level, report-level filters and slicers, so the value will correctly update based on what’s filtered in that specific visual. There’s no need to use ALLSELECTED, which can unnecessarily complicate the logic and potentially ignore filters you want to keep.

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Hi @v-hashadapu, I updated my measure to include calculate and this does not work.

Hi @WilliamA , Sorry to know it didn't work. Try below measure, if that doesn't work either, consider sharing more details including a sample scenario, explaining what you are working on, your data and other details (excluding any sensitive information).  

 

Row Count Visual =
CALCULATE(
COUNTROWS('Search All'),
FILTER(
ALL('Search All'),
CALCULATE(
COUNTROWS('Search All'),
ALL('Search All'),
KEEPFILTERS('Search All')
) > 0
)
)

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Hi @v-hashadapu, the second measure still did not work. the link below is a sample pbix file illustration the issue and the steps to replicate.

Sample Data Row Count.pbix

Hi @WilliamA , Your link to the sample data doesn't work. can you share the details manually, even images are fine. Thank you.

Hi @v-hashadapu 

 

See below images:

 

1.  the image here shows the row count measure of sample data. this returns 3.  this matches the table visual which displays the columns from Sample data.

WilliamA_0-1747106374126.png

2.  I apply a filter directly on the table visual to filter for value ABC in column 1. this updates the table however row count is still 3 when expected count should be 1.

WilliamA_1-1747106480339.png

3. I add the same filter at the page level and row count updates correctly.

WilliamA_2-1747106517805.png

I hope this helps.

Hi @WilliamA , Thank you for reaching out to the Microsoft Community Forum.

 

The reason your measure doesn’t update when using visual-level filters on a table is that visual-level filters only affect the visual they’re applied to. A card or separate visual won't reflect those filters because Power BI doesn’t share visual-level filter context across visuals. Page-level filters or slicers work because they apply globally, but with 80 columns, slicers aren’t practical and moving filters manually isn’t scalable.

 

Create a matrix visual that mimics the card but exists in the same filter context as your table. Add your Row Count measure to the Values area of a matrix with no rows or columns. Then, in the Filter Pane, copy the same visual-level filters applied to your table and apply them to the matrix. This way, the row count will update correctly based on the filters without needing slicers or page-level changes. You can format the matrix to look like a card by hiding headers and adjusting text size for a clean, simple display.

 

If you prefer, you can also place the measure directly inside the table visual as a column, it will respect the filters and show the correct count per row, though it may be visually repetitive.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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