Forum Discussion
Always one value selected in Slicer
- Anonymous10 years ago
Hi Ilia,
Currently, we are not able to set default value as you describe and disable the ability for user to cancel choice in slicers. Some ideas about the issue have been submitted to Power BI team, you can vote this issue in the following links.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7162004-default-selected-slicer-or-tile-by-value-configura
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/12299949-single-selection-slicer
Thanks,
Lydia Zhang
Hello,
There is no option to disable "Select all" or to have a force selection in a slicer. But i have developed a workaround to hide data for "ALL". Create 2 measures as below.
Valid_selection = if(HASONEVALUE(Slicer_attribute), "", "Error: Select a Single value")
Valid_selection_numeric = if(HASONEVALUE(Slicer_attribute), 1, 0)
Pull the first measure into a card, which will be blank when a single value is selected and will throw an error message when it is more than one/All.
Second measure to be added as a visual level filter, add Valid_selection_numeric = 1 as visual level filter on all the visuals. Which means, the data will be displayed only when a single value is selected.
Nothing but hiding the data for all.
Let me know if you have any questions.
Hope this helps.
Single select slicer is now available: