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