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.
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.
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.