Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
I have a table visual in PBI and wanted to see how many records are there on that visual.
The measure that I created Row Count = COUNTROWS('Table_Name') will give me total number of rows in the dataset but not in the table visual I have.
See in below example, I have only two rows of records, but row count will say 4, that is not correct in my case.
How can I get this correct number of rows?
Thanks,
pthapa
Solved! Go to Solution.
Hi @pthapa, jdbuchanan71, thank you for your prompt reply!
Try the following measure:
Row Count Visual = COUNTROWS(SUMMARIZE(ALLSELECTED('Table'), 'Table'[CustomerName], 'Table'[CustomerID]))
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pthapa, jdbuchanan71, thank you for your prompt reply!
Try the following measure:
Row Count Visual = COUNTROWS(SUMMARIZE(ALLSELECTED('Table'), 'Table'[CustomerName], 'Table'[CustomerID]))
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous ,
Appreciate your response, yes the trick does work finally. I had to put all the columns that are in the visual to summarize, then it worked.
Thanks again.
pthapa
Not sure why, the total doesn't work for all. Anyone has idea how to fix the total?
It seems working for some but not for all if I use the filter for Customer No to check.
Thanks,
pthapa
@jdbuchanan71 ,
Thanks for quick response however the distinct count will not give correct total at the bottom, why?
See example below.
Because the count of unique customer no_ is 1 (100004), it is not organized the way I thought. Take a look at Visual level calculations, you might need to go down that route since you are only wanting to cout the rows shown in the table.
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview
Total Still isn't working, why?
Thanks,
pthapa
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |