Forum Discussion
Need Help with Dynamic Row count Based on Table Visual and Slicers
- 8 months ago
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
- 8 months ago
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.β
Basic pattern (single table)
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.β
When multiple columns define a row
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.