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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Single select slicer not removing default

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

Status: New
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.

 

Support Ticket.gif

 

Best Regards,
Qiuyun  Yu

pbillava
Frequent Visitor

Hi @dom99

 

Do you have any solution for this. Please help am also facing same issue.

Am using embedding option and applying a filter from javascript

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.

 

pbillava
Frequent Visitor

Hi @dom99 

 

We had tried reseting filter from Javascript but we observed recently the already checked item still does not clear.

If you dont mind if you can your code snipet , that would help

 

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

pbillava
Frequent Visitor

Hi @dom99 

 

 

This worked ..gr8.

thank you so much 🙂

 

rkr
Regular Visitor

@pbillava can you please elaborate on how exactly you fixed this issue.