Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yuching_chang
Helper II
Helper II

Filter a report using query string parameters in the URL with single select slicer

Hi there

 

I have a PowerBI dashboard (connection: Analysis Services) embedded in a web and we want to build URL to pass down parameters into PowerBI - so when users filter something in the web and link to PowerBI, the filtered parameters are passed down to PowerBI.

 

I've followed the instruction here: https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

 

Because we still need to allow users to filter in PowerBI, I need to build slicers in the dashboard. Then i found if today the slicer is Single Select, it goes wrong, but if Multi Select, it goes right...

 

For example - I have 2 slicers, L1 Location is Single Select while L2 Location is Multi Select

Firstly, I apply the query string to my URL to only pass parameter L2 Location = Location A2, and it works as below

https://mypowerbiserver/mypowerbifolder/mypowerbiname/?rs:embed=True&filter=Sheet1/L2_x0020_Location eq 'Location A2'

Capture1.PNG

 

Then, I tried to apply the query string to my URL to only pass parameter L1 Location = Location B, but it doesn't work...

The slicer shows the option of "Location B", but it still selects Location A, and no data is displayed

https://mypowerbiserver/mypowerbifolder/mypowerbiname/?rs:embed=True&filter=Sheet1/L1_x0020_Location eq 'Location B'

Capture4.PNG

 

Lastly, I tried to change slicer Location 1 to be Multi Select, and applied query string to both slicers, it works

So I guess it's because of Single Select...and would like to know if any way to fix this...? Thanks!

https://mypowerbiserver/mypowerbifolder/mypowerbiname/?rs:embed=True&filter=Sheet1/L1_x0020_Location eq 'Location B' and Sheet1/L2_x0020_Location eq 'Location B2'

Capture3.PNG

1 ACCEPTED SOLUTION
yuching_chang
Helper II
Helper II

hi @d_gosbell 

 

thanks for the reply, after several attempts, I found the workaround to use Hierarchy Slicer from marketplace and make it as Singel Select. It works, just the drawback is we can't have the slicer in the format of dropdown list, but still it helps 😉

View solution in original post

3 REPLIES 3
yuching_chang
Helper II
Helper II

hi @d_gosbell 

 

thanks for the reply, after several attempts, I found the workaround to use Hierarchy Slicer from marketplace and make it as Singel Select. It works, just the drawback is we can't have the slicer in the format of dropdown list, but still it helps 😉

d_gosbell
Super User
Super User

Unfortunately there is no easy fix for this.

 

Url filters do not change slicers, they work by adding a report level (all pages) filter.

 

So when you change your slicer to a single select you are forced to save your report with a default value selected (eg L! Location = Location A). Then when you apply a url filter it adds a new "all pages" filter in the filter pane and if you select L1 Location = 'Location B' for example you now have the scenario where the filter condition is now  L1 Location = 'Location A' AND L1 Location = 'Location B' which filters out all your data.

 

At the moment you cannot use single select slicers with URL filters.

Is there an update to this, I want to be able to select a value from a slicer but not filter the whole report. Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.