Hi,
When using a single select slicer and publishing to the web it, it does not snap to the first value in the list but keeps the default, even if the default no longer exists.
The power bi desktop forces you to select a default value, which when published to the web and having one report serving many customers with RLS may not be relevent. Therefore reports appear blank until a new value is selected, whereby the default disappears from the list.
We need the single select slicer to be able to clear the default selection and snap to the first in the list, this used to be the behaviour and it must have changed recently. Until this happens the single select slicer is not useable for enterprise solutions with many customers and RLS.
Thanks
13 Comments
- v-qiuyu-msft
Community Support
Hi dom99,
>>When using a single select slicer and publishing to the web it, it does not snap to the first value in the list but keeps the default, even if the default no longer exists.
Would you please clarify the bold section? Based on my test, both in Power BI desktop and service, once we turn on Single Select option for the slicer visual, we must select one value in the slicer. By default, the first value within the slicer is checked.
Best Regards,
Qiuyun Yu - dom99
Advocate V
Hi,
Yes I will try to clarify.
We use Power BI Embedded. We use RLS in our reports so that many different customers can access a single report but only see the data which is relelvent to them.
This is how to replicate:
In Power BI Desktop have a single select slicer which for the sake of this example lets call City. It will default to the first value in the list, so lets say it defaults to "London", with another 10 cities listed below. Save the report and publish to the web. View the report embedded in a website as a customer who doesnt have the City "London", and because the report uses RLS there is no data relating to that city. What happens is even though the user has no data relating to the City "London", the slicer still displays "London" when the report loads, causing the whole report to appear blank. When the user selects a different value from the slicer list which they do have data for, the City of London disappears.
The expected behaviour is when the report first loads, the slicer snaps to the first available value, rather than the value which was saved in the desktop, as that value may no longer be in the report.
Please let me know if this makes sense or not.
Thanks
- dom99
Advocate V
v-qiuyu-msft Hi, did you manage to look at my yclarificaiton of the problem? This problem will effect anyone using power bi embedded with RLS and single select slicers.
- v-qiuyu-msft
Community Support
Hi dom99,
As it's a Power BI embedded related issue, I would suggest you create a support ticket to let engineers look into the issue on your side.
Best Regards,
Qiuyun Yu - dom99
Advocate V
The work around was to use the javascript API to reset the filter on loading the report. Doing this made it snap to the first in the list.
- dom99
Advocate V
Just using the setSlicerState code here depending on your slicer type
https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers
But when you do, leave it blank with no values applied.
The best place to try it out is in the embedded playground where you can add / remove the javascript in a interactive sandbox
https://playground.powerbi.com/
Hope that helps
- pbillavaFrequent Visitor