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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RafaelAri
Helper III
Helper III

Get number of rows in Table visual

I have a Table visual, that is based on some calculated measures.

I need a Card visual, to display the number of results (rows) in the table.

I suppose I need a mesure with a kind of "COUNTROWS", but I can't get the correct results

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @RafaelAri ,

To display the number of rows shown in the Table visual on a Card visual, you need to create a measure that calculates the count of rows based on the same filters applied to the Table visual.

Can you share the DAX used for calculation?

You can try also something like this:

 

RowCount = COUNTROWS(VALUES(TableName[KeyColumn]))

 



View solution in original post

7 REPLIES 7
Idrissshatila
Super User
Super User

Hello @RafaelAri ,

 

if you mean you want the count of the table visual as per of the filters and what you see in the report, the you can create a measure that has a virtual table and you put the same columns as in the table visual and you wrapt it up with a count rows.

 

something like this but you adjust it with your fields

RowCountMeasure = 
VAR VirtualTable = 
    SUMMARIZE(
        Sales,
        Sales[Product],                 -- Group by Product
        "Total Sales", SUM(Sales[Amount]), -- Create a measure for Total Sales
        "Average Sales", AVERAGE(Sales[Amount]) -- Create a measure for Average Sales
    )
RETURN 
    COUNTROWS(VirtualTable)


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you, but It did not solve the problem.
I'll try to open a new post, with a different characterization of the problem.

Bibiano_Geraldo
Super User
Super User

Hi @RafaelAri ,

To display the number of rows shown in the Table visual on a Card visual, you need to create a measure that calculates the count of rows based on the same filters applied to the Table visual.

Can you share the DAX used for calculation?

You can try also something like this:

 

RowCount = COUNTROWS(VALUES(TableName[KeyColumn]))

 



Thanks,

I tryed this solution, it gives me a big number, that is totaly not what I expect

bhanu_gautam
Super User
Super User

@RafaelAri , I hope you are trying using countrows like

 

RowCount = COUNTROWS('YourTableName')

 

Your process seems correct can you share sample data




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks, but this gives the total rows, without the filtering

Can you share the sample file or sample data?
You can upload to cloud like onedrive or other and share the link for download here.

 

Thank you

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Kudoed Authors