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
LLGreen
Frequent Visitor

Count the number of table visual rows after user excludes a row

I have a page in a Power BI report with a table visual (7 columns) that is filtered by three page-level filters and two report-level filters (in the Filters pane). Above that is a card visual that shows the number of rows in the table visual (it counts the number of rows in the data table that fit two criteria). Some users have been editing the table visual by right-clicking on rows they don't want and choosing "Exclude", which removes the row from the table visual (setting up a visual-level filter that excludes all the combined column values from the that row); however, the card visual still shows the count based on the data table. For example, the table visual starts with five rows, and the card visual shows 5. The user then "Exclude"s one row, leaving only four showing in the table visual, but the card visual still says 5.

 

Is there a way to count only the number of rows that are visible in the table visual, and not the count from the filtered data table? I've tried various combinations of CALCULATE, COUNTROWS, and ALLSELECTED, but to no avail.

7 REPLIES 7
v-sgandrathi
Community Support
Community Support

Hi @LLGreen,

 

Thank you @danextian@ryan_mayu @lbendlin  @Praful_Potphode  for your responses to the query and the contribution.

Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
Please feel free to reach out Microsoft fabric community forum.

Praful_Potphode
Resolver III
Resolver III

Hi @LLGreen 

to propogate the filter to the card visual, try using  ISFILTERED/VALUES/TREATAS/SELECTEDVALUE DAX combination to create your card value.what this will do is when you exlcude something ,these dax functions will check the current filter state and then return the count.

PLease give kudos or mark it as solution once confirmed.

Thanks and Regards,

Praful

Can you give me an example of how you would set this up?

lbendlin_0-1761255875138.pnglbendlin_1-1761255904006.png

 

 

danextian
Super User
Super User

Hi @LLGreen 

 

You can count the number of rows a table visual returns by creating a virtual table of the columns the visual has. Below is an example

danextian_0-1761194276111.pngHowever, unless the card is cross-highlighted and/or there is a slicer selection that can affect both visuals, the value in the card won't update as the the filter as applied to the visual only - excluding/including a row creates a visual not page level filter.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
ryan_mayu
Super User
Super User

@LLGreen 

when you do the exclude action in the table visual, that means you will add a table visual filter. So the visual level filter will only affect that visual. If you want to affect other visuals, it's better to add a slicer and ask users to select in that slicer. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




lbendlin
Super User
Super User

You will need to experiment with the FILTERS() function  to have a chance at this.

 

FILTERS function (DAX) - DAX | Microsoft Learn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.