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
anmolmalviya05
Super User
Super User

How to show total rows in card visual

Hi everyone, I have a table visual and slicers in my report.
I want to include a card visual which will show total number of rows in the table visual

4 ACCEPTED SOLUTIONS
AnkitaaMishra
Super User
Super User

Hi @anmolmalviya05 , 
You can write below measure to countrows dynamically on the table visual : 

AnkitaaMishra_0-1733476434174.png

Here, if you change the slicer then the measure will show you related number of rows. 

Let me know if this helps or share more details of your query.

Thanks,

Ankita

View solution in original post

danextian
Super User
Super User

Hi @anmolmalviya05 

If it is a table visual, you will need to write a measure that mimics what happens in a table visual. For example

RowCount = 
VAR _tbl =
    SUMMARIZECOLUMNS (
        'Dates'[Month and Year],
        'Dates'[YYYYMM],
        'Category'[Category],
        'Geo'[Geo],
        "Total_Revenue", [Total Revenue]
    )
RETURN
    COUNTROWS ( _tbl )

 

danextian_0-1733476393485.png

 





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.

View solution in original post

Hi @AnkitaaMishra, Thanks for your response,
It works

View solution in original post

Hi @danextian, Thanks for your response
It works

View solution in original post

8 REPLIES 8
danextian
Super User
Super User

Hi @anmolmalviya05 

If it is a table visual, you will need to write a measure that mimics what happens in a table visual. For example

RowCount = 
VAR _tbl =
    SUMMARIZECOLUMNS (
        'Dates'[Month and Year],
        'Dates'[YYYYMM],
        'Category'[Category],
        'Geo'[Geo],
        "Total_Revenue", [Total Revenue]
    )
RETURN
    COUNTROWS ( _tbl )

 

danextian_0-1733476393485.png

 





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.

Hi @danextian, Thanks for your response
It works

AnkitaaMishra
Super User
Super User

Hi @anmolmalviya05 , 
You can write below measure to countrows dynamically on the table visual : 

AnkitaaMishra_0-1733476434174.png

Here, if you change the slicer then the measure will show you related number of rows. 

Let me know if this helps or share more details of your query.

Thanks,

Ankita

Hi @AnkitaaMishra, Thanks for your response,
It works

Holiday
New Member

Hi @anmolmalviya05

1. Create a new measure in your Power BI model: 'Total Rows = COUNTROWS(YourTableName)'.
2. Add a new card visual to your report.
3. Add the 'Total Rows' measure to the card visual.
4. The card will now display the total number of rows in your table, dynamically updating based on slicers.

Hi @Holiday,Thanks for your  response,
I tried this but it's not working

rohit1991
Super User
Super User

 


To show the total rows in a card visual in Power BI:

  1. Create a Measure: Use the formula Row Count = COUNTROWS(TableName), replacing TableName with your table's name.

  2. Add a Card Visual: Drag the Row Count measure to the card visual.

  3. Ensure it works with slicers: The measure will automatically update based on slicer selections.

This will dynamically display the total number of rows in your table visual.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi @rohit1991, Thanks for your  response,
I tried this but it's not working

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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