- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How to get number of rows from a table visual
Hi,
I trying to figure out how I can create a measure that can show the number of rows in a table visual.
I have made a simple measure like COUNTROWS('Tablename'), and that works ok as long as I just use the Page and Report filters, but when it comes to the Visual filters, it doesn't change the numbers. I assume it's because the visual filter is kind of done "within" the visual and therefore doesn't affect my measure. The question if then if it's possible to create a measure that works "inside" the visual so I can see the acual number of records in the visual - no matter where the filtering is done?
Sorry if this is a double post, but I doesn't find the one I posted for some hours ago.
Regards
Steen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @steen_p ,
I suspect that your data set is too large to cause calculation delay. When filtering at the visual level, maybe the calculation is frozen. Generally speaking, applying the same filter at three levels will not affect the results.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @steen_p
In my understanding you want to count rows for a visual when a filter is selected! if so then you need to embed the Measure SLECTEDVALUE to your COUNTROWS.
It's not very clear your description maybe if you can share a Sample PBIX then we can help you better.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
I'm not sure if SELECTEDVALUE will solve the problem, because it's not a specific selected value as such I'd like to count, but how many rows I have in a table visual.
And my existing measure that just does a COUNTROWS seems to do it ok as long as I use the filters for the Report and the Page, but it doesn't reflect the filtering im doing on the visual.
So I'm looking for a way to do this? The reason is that my users are exporting data to Excel from this table and since Power BI are limited to export 150.000 rows I need to have a measure showing how many rows I have in the table with the different filters set.
Maybe it doesn't have to be a measure or a count, but I just can't figure out any other way yo get this number.
In another reply., I also go the suggetion to use SUMMARIZECOLUMNS and then COUNTROWS but for some reason I can't get that measure to work at all.
Rgiht now my measure is -
No of Rows in selection =
COUNTROWS(
SUMMARIZECOLUMNS('TableName'[Column1], 'TableName'[Column2]))
This one works when I test it in DAX Studio, but when I add it as a measure in my Power BI file, if gives me an error about "Calculation error im measure 'All Meassures'[No of Rows in selection]: SummarizeColumns and AddMissingItems() may not be used in this context."
I simply can't figure out what it wrong with it in Power BI, when it works in DAX Studio.
I'm still not sure if it will solve my problem though, because I could image that this wouldn't "see" the filtering on the visual either.
Regards
Steen

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-25-2024 06:03 AM | |||
12-07-2023 04:54 PM | |||
04-09-2024 12:10 AM | |||
08-01-2024 08:20 AM | |||
04-27-2023 06:37 PM |
User | Count |
---|---|
134 | |
106 | |
88 | |
55 | |
46 |