Forum Discussion
Clear all slicer selection when single select is enabled
- 6 years ago
Hi Anonymous ,
You may turn off the "Single select" under Selection controls in Format option, then you can make other selections in slicer visual.
Or you may use "Edit interactions" feature to choose which visuals to be filtered by one special visual. See more details: https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have found that you cannot clear a single select slicer, something will always be selected.
However I had a user requirement that a visual must be empty until one and only one selection is chosen from a slicer. This required a workaround.
I used a normal multi-select drop down slicer :
With ctrl + click for multi select On, just to make it more difficult to attempt selecting more than one and "Select All" off because that went against the user requirement immediately. Single select off, to allow the filter to be cleared with a "Clear Filters" button.
Then use a measure, applied to the visual as a filter to show information only when a single selection is chosen.
single_ID_selected =
CALCULATE(
// Check if there is exactly one PersonID selected
IF(
// Ensure that the PersonID column is being filtered
AND(ISFILTERED(all_the_data[PersonID]),
// Check if the number of distinct PersonID values is exactly 1
DISTINCTCOUNT(all_the_data[PersonID]) = 1),
1, // Return 1 if both conditions are true
0 // Return 0 if either condition is false
),
// Apply all existing filters in the current context
ALLSELECTED(all_the_data)
)
In addition to that when the visual was blank there was a user instruction text box which said "Select a single person ID from the filter" If the user pressed CTRL + click on a second person ID the visual would go blank and the user instruction reappears as a reminder of the functionality.