Latest Enterprise DNA Initiatives

Use a query parameter in a visual filter

I have 2 query parameters that I use to filter a table. Partner 1and Partner 2.

e.g. filter if ClientNo = Partner 1 or Partner 2

Paramaters

One of the reasons I do this is to limit the users interactions with the visual. They are all new to Power BI and I want to keep it simple for a while.

I now have two separate report tabs for each Partner , using the same visual.
As there are two sets of data in the query, the visuals show all of the data for both Partners. I now have to go into the visual filter on each tab to select the individual partner.

Is there anyway to set the visual filter using the value in the query parameter?

Thank you,

Paul

@kellysolutions,

One thing you could do is create a “Home” Page in this report that shows up when the user opens the report. On that page you could have a slicer that syncs with all pages in the report. Just click on View Tab from PBI Desktop, and then Sync Slicers to set this up. Here is something similar I did so that a particular Team can only see their data when viewing the report.

Thanks
Jarrett

Hi @kellysolutions,

At the moment it’s not supported to expose Query Parameters in a report (with import mode).
However you can upvote that idea here:


.

For DirectQuery models, check out the new Dynamic query parameters.

.

Like you already mentioned the most straight forward solution would be to introduce a Page level filter, Lock and Hide that from the user in the Service.

Or create some kind of Navigation like @JarrettM has already suggested.
.

Alternatively you can explore filters in Report URLs:

I hope this is helpful.

Hi @kellysolutions, we’ve noticed that no response has been received from you since the 3rd of December. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

@Melissa and @JarrettM

Thank you for your suggestions.

In the meantime I have come up with a different idea. Probably not that elegant, but for me at least, it is easy to follow.

1.I query the SQl database using the parameters.
2. I then create a reference table for each of the parameters.
3. I create two report tabs, each using one of the reference tables.

Maybe not the slickest, but it works.

Thank you again.

Paul