Forum Discussion
Dynamic options for chiclet slicer
Hi,
Can we create a dynamic options for a slicer ? I have a need like a switch button which I think nice to use Chiclet slicer, but the options is a predefined options like : View By Country and View By Item group.
The idea is this button will be used for switching a bookmark, so I have 2 tables, one is table with country grouping the other is table with item group grouping, and these two will be displayed interchangeably based on which button pressed. Actually using normal slicer also fine, I only want to know how to create the options without any datasource (table) as the based .
The other issue is I'm using Direct Query mode, so I cannot create table and input the options manually.
Thanks
Hi admin_xlsior ,
You could always turn the direct query into a composite model that uses direct query and import mode tables.
But keeping the model has you have and since you cannot use measure within slicers I believe that you can male use of buttons to simulate the effect of the selection I can see two different alternatives and you can select the best one for you:
- Using two buttons and having an effect of sliding with the option selected on the left and rigth
- Using for buttons and making it similar to a slicer turnnig off an on two at a time
See both examples below and in attach file.
4 Replies
- MFelix
Super User
Hi admin_xlsior ,
To what I can understand you want to have two visualizations and change the way the calculation is done in this case you can use bookmarks and two different visualizations and no need to have the use of a slicer you can create two buttons and then make connection to the different bookmarks.
Check the links below:
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks
- admin_xlsior
Post Prodigy
Hi MFelix ,
True, but I need to show which button are in "pressed" condition, this is not supported with button 😅
So, the requirement is, all the options are still visible for user to know what are the options available, but also showing which option currently showing. Slicer is a commong and simplest way to show it. Alhtough, chiclet slicer is nicer to have.
Thanks.
- MFelix
Super User
Hi admin_xlsior ,
You could always turn the direct query into a composite model that uses direct query and import mode tables.
But keeping the model has you have and since you cannot use measure within slicers I believe that you can male use of buttons to simulate the effect of the selection I can see two different alternatives and you can select the best one for you:
- Using two buttons and having an effect of sliding with the option selected on the left and rigth
- Using for buttons and making it similar to a slicer turnnig off an on two at a time
See both examples below and in attach file.
- AnonymousNot applicable
HI admin_xlsior,
Did MFelix 's suggestion help with your scenario? if that is the case, you can consider to Kudo or accept these suggestions to help others who faced similar requirements to find it more quickly.
If these also not help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng