Reputation: 172
I have created a paginated report via Power BI Report Builder; I have also created a Power BI Dashboard to render and filter the report. I have linked up all of the report parameters to slicers so that the users can filter the pages that are returned to them.
For troubleshooting, I am rendering the incoming parameters to the report.
="WellId: " & Parameters!pLocationId.Value & " ---- Reporting Name: " & Parameters!pProject.Value & " ---- Year: " & Parameters!pYear.Value & " ---- Quarter:" & Parameters!pQuarter.Value
It appears as through unselected slicer values are being pushed to the report.
Has anyone else run into this or have a recommendation for how to only receive slicer values that are selected? As near as I can tell the first value is passed when nothing is selected from the slicer.
Upvotes: 0
Views: 2176
Reputation: 172
Thanks to @GregGalloway to get me thinking about concatenation.
I opted to combine the filtered values with a delimeter (tilde).
DAX:
pWellId = IF(
ISFILTERED(ReportFilters[locationid]),
CONCATENATEX ( VALUES (ReportFilters[locationid] ) , [locationid] , "~"),
BLANK()
)
On the report side, I set a single text parameter and passed in the above value.
This is then passed to the DB (Sql Server) where the values are then split out:
wellId IN (SELECT value FROM STRING_SPLIT(@sqlWellId, '~') WHERE value <> '')
Upvotes: 0