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
RJ1993
Frequent Visitor

[SOLVED] Slicer - ignore last selected slicer item when updating data

Update 13-07-2021: Problem solved

For anyone interested in solving this issue, you can acquire the correct behaviour of the slicer by using the 'Chiclet Slicer' visual in the AppSource and the 'Forced selection' option that is available for this slicer.

 

------

 

Hello everyone,

 

For a specific project, I created a page with a circle graph and a slicer. Each slicer item represents a question, for which the circle graph shows the distribution of the answers to that question (e.g., Yes or No). This project is constructed as a template in which the data source gets changed for different clients by getting the data from an API. 

 

A representation of the data would be like this (Client A):

RespondentIdQuestionAnswer
1AYes
1BNo
2ANo
2BNo
3AYes
3AYes

 

When changing the data source for client B (and thereafter, publishing it to the PowerBI service), the data can look like this:

 

RespondentIdQuestionAnswer
1CYes
1DNo
2CNo
2DNo
3CYes
3DYes

 

Note: the questions can be completely different, although it is not a requirement that they are all completely different (e.g., A can still occur in client B dataset). 

 

When changing the data source from Client A to Client B in the template, the issue occurs that PowerBI will remember the last selected value of client A, which might not exist in Client B. As a result, the slicer will 'remember' this value, showing a blank for the circle graph as no data exists for that specific value.

 

To simulate this idea, I generated 5 random numbers in Power Query and added a slicer to select only one value.

RJ1993_0-1626100717510.png

When refreshing the dataset (therefore, changing the random numbers) while keeping 4 selected, the following occurs:

RJ1993_1-1626100763426.png

4 remains selected, although it is not part of the 5 random numbers that got generated. It therefore does not exist.

 

When selecting 15 instead of 4, the value 4 will disappear in the slicer and everything is okay:

RJ1993_2-1626100826320.png

 

To what extent is it possible to 'ignore' the last selected slicer item when updating data? One blog on Cross Join (https://blog.crossjoin.co.uk/2019/07/10/power-bi-slicers-show-values-that-do-not-exist/) talked about this, although no solution seems to exist to date. I'm aware that I can manually 'fix' this issue by just selecting a different value, but given the size of the project, this might lead to a lot of 'quick fixes' that could take up a lot of time.

 

Thank you for reading!

Kind regards,

RJ1993

 

 

 

1 ACCEPTED SOLUTION
RJ1993
Frequent Visitor

After a long time of searching, the Chiclet Slicer in the AppSource has the option 'Forced Selection'. This ensures that it will always select one option, ignoring the last selected value if the data is dynamic.

View solution in original post

2 REPLIES 2
RJ1993
Frequent Visitor

After a long time of searching, the Chiclet Slicer in the AppSource has the option 'Forced Selection'. This ensures that it will always select one option, ignoring the last selected value if the data is dynamic.

RJ1993
Frequent Visitor

Anyone that has an idea?

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.