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
Hi Team,
I’m currently working on a project and there is a requirement to display the row count of a table visual.
The row count should update dynamically every time the user interacts with slicers.
Since the fields in the table visual are not static and change based on the user's slicer selection, the row count should also update accordingly and display the correct number of rows shown in the table visual.
Please help me with a solution that allows the row count to change dynamically based on slicer selections.
Thank you
Solved! Go to Solution.
Create a Measure
Nr Rows = COUNTROWS ( YourTable )
This will be dynamic and will feel slicers selections
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @Pradeep_12 ,
if your visual table is different from yout table you can write a measure as follows:
cnt = var tbl = summarize(your_table , [column1 in visual table] , [column 2 in visual table] ,...)
return
countrows(tbl)
if visual table is the same as your table you just need to write a measure like this:
cnt= countrows(your_table)
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution ✔️ to help the other members find it more quickly.
Use a simple COUNTROWS over the key column (or a grouped set of columns) and show it in a Card; it will automatically respect all slicers and filters applied to the table visual.
If the table visual is driven by one fact/dim table and each row is uniquely identified by a key (e.g. ID, TransactionID):
VALUES returns the distinct keys visible after slicers, page filters, and visual filters.
COUNTROWS over that list gives the exact row count of the current table visual.
If a “row” in the table is defined by a combination, e.g. Customer + Date:
SUMMARIZE builds the same grouped grain as your visual, and COUNTROWS counts those groups after all slicers.
Use either measure in a Card visual; it will update dynamically whenever users change slicers or other filters.
Hi @Pradeep_12 ,
This is the default behaviour of Power BI.
As suggested by @FBergamaschi , create a measure for row count and you're all good.
If you have rowcount and slicer columns from 2 different tables, make sure they are connected via relationships and can filter
When ever you select anything in the slicer,it will filter the visualization created on the page.
if you want to turn it off you can use edit interactions.
Please give kudos or mark it solution once confirmed.
Thanks and Regards,
Praful
Hi @Pradeep_12
You can display a dynamic row count in Power BI Service that updates automatically whenever slicers are applied. The logic is the same as in Desktop, but once you publish the report to the Service, the measure continues to respect all slicers, page filters, and visual filters.
Let’s assume you have a Sales table like this:
| 1 | Alice | East | 01-Jan-24 | 120 |
| 2 | Bob | West | 02-Jan-24 | 200 |
| 3 | Carol | East | 03-Jan-24 | 150 |
| 4 | David | North | 04-Jan-24 | 180 |
| 5 | Emma | South | 05-Jan-24 | 220 |
| 6 | Frank | East | 06-Jan-24 | 130 |
| 7 | Grace | West | 07-Jan-24 | 170 |
1. Basic Row Count (works with slicers & filters):
Visible Row Count =
COUNTROWS ( VALUES ( Sales[TransactionID] ) )
2. Multiple Columns Define a Row (e.g., Customer + Date):
Visible Row Count =
COUNTROWS (
SUMMARIZE ( Sales, Sales[Customer], Sales[Date] )
)3. Simple Alternative (if table directly uses Sales rows):
Row Count = COUNTROWS ( Sales )Load the dataset above into Power BI (you can paste it into Excel and import, or enter manually).
Create a Table visual showing Customer, Region, and SalesAmount.
Add slicers for Region and Date.
Create the Visible Row Count measure.
Add a Card visual with the measure.
Interact with slicers:
Select Region = East → Table shows 3 rows, Card shows 3.
Select Region = West → Table shows 2 rows, Card shows 2.
Clear slicers → Table shows all 7 rows, Card shows 7.
Hi @Pradeep_12 ,
Thank you for reaching out to the Microsoft Community Forum.
Please try below measures.
1. Below measure Counts the number of rows currently visible in the table visual. This works with all slicers, page filters, and visual-level filters.
Visible Row Count =
COUNTROWS (
VALUES ( 'Table_name'[RowKeyColumn] )
)
Note: RowKeyColumn must uniquely identify a row in the table. (ID, TransactionID, OrderNo, etc). VALUES() respects all slicers & filters. Works even if columns shown in the table visual change.
Please follow below steps.
1. Create this as a measure.
2. Drag it in a Card visual
3. The number updates instantly with slicers
2. It shows the exact row count of the table visual after all visual filters, When Top N, measure filters, or complex visual filters are used.
Visible Row Count (Visual Accurate) =
COUNTROWS (
SUMMARIZE (
'Table_name',
'Table_name'[RowKeyColumn]
)
)
Note: Use Top N, use measure-based filters.
3. If your table uses multiple columns as a “row” (Customer + Date defines one row) , try below measure.
Visible Row Count =
COUNTROWS (
SUMMARIZE (
'Table_name',
'Table_name'[Customer],
'Table_name'[Date]
)
)
4. If your table visual is built from MEASURES only (no physical row column), then try below measure.
Visible Row Count =
COUNTROWS (
VALUES ( 'DimTable'[DisplayColumn] )
)
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi @Pradeep_12 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
Hi @Pradeep_12 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
You don’t need anything fancy for this.
Row Count =
COUNTROWS ( FactTable )
If the table can show rows from different tables or via a field parameter, use ALLSELECTED on the main table behind the visual:
Row Count =
COUNTROWS (
ALLSELECTED ( FactTable )
)
Put that in a Card, align it above the table, and you’re done.
If this answer helped, please click Kudos or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Hi @Pradeep_12 ,
if your visual table is different from yout table you can write a measure as follows:
cnt = var tbl = summarize(your_table , [column1 in visual table] , [column 2 in visual table] ,...)
return
countrows(tbl)
if visual table is the same as your table you just need to write a measure like this:
cnt= countrows(your_table)
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution ✔️ to help the other members find it more quickly.
Create a Measure
Nr Rows = COUNTROWS ( YourTable )
This will be dynamic and will feel slicers selections
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |