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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a filtered table in a Power BI report and want a card to show the total number of rows in the filtered table, at present I have a card in the same Power BI report and it shows a value for all unfiltered rows. The card uses a field from one table whereas the report table uses fields from several tables that have relationships - I am working with data from Project Server if that helps where there are data tables for projects, resources, assignments and more besides.
Hi @Anonymous ,
--I have a filtered table in a Power BI report and want a card to show the total number of rows in the filtered table
--Please create a new measure like:
Measure = COUNTROWS(ALL('YourTableName'))
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Thanks for the suggestion, when I create the measure it recognises a table name from the data source. The Table that is displayed on the Canvass in the Report/Dashboard contains data from several tables that have relationships. The calculated measure I created returns the value of the total number of rows in the table of data in the data source not the table displayed in my Power BI Report - I have looked and cannot see a name for the table created using the Table Visual, as a result the calculated measure is not displaying the expected value.
Hi @Anonymous ,
What fields are in your table visual?
Please try this:
Measure =
COUNTROWS (
SUMMARIZE (
ALL ( 'Table1' ), // Table1 should ideally be at 1 end of the relationship in the model
'Table1'[Column1],
'Table1'[Column1],
'Table2'[Column3]
... // Fields not aggregated in the table visual
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Thanks for the suggestion but Table1 is not recognised. I get this error.
The syntax for '.' is incorrect. (DAX(COUNTROWS ( SUMMARIZE ( ALL ( 'Table1' ), // Table1 should ideally be at 1 end of the relationship in the model 'Table1'[Column1], 'Table1'[Column1], 'Table2'[Column3] ... // Fields not aggregated in the table visual )))).
Hi @Anonymous ,
I modified the dax code.
Please try:
Measure = CALCULATE(COUNTROWS(SUMMARIZECOLUMNS('Calendar'[Month],'financials'[Country],'financials'[Product])),ALL())
The code I posted is just an example, you need to modify the code according to the actual model.
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hello @Anonymous, can you please try this approach:
1. Create a New DAX Measure
Total Filtered Rows = COUNTROWS(FILTERED_TABLE)
2. Drag a card visual onto your canvas and place the measure in the card. Since you mentioned that your report table uses fields from several tables with relationships, ensure that these relationships are properly set up in the Power BI model.
3. Apply different filters to your report and observe how the number displayed in the card visual changes. The number should reflect the count of rows visible in the filtered table. (If you want the card to show a count of distinct values, you can use the DISTINCTCOUNT function instead of COUNTROWS)
Should you require any questions or further assistance, please do not hesitate to reach out to me.
Thanks for the suggestion which was similar to the previous answer, when I create the measure it recognises a table name from the data source. The Table that is displayed on the Canvass in the Report/Dashboard contains data from several tables that have relationships. The calculated measure I created returns the value of the total number of rows in the table of data in the data source not the table displayed in my Power BI Report - I have looked and cannot see a name for the table created using the Table Visual, as a result the calculated measure is not displaying the expected value.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |