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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Neutralcats
New Member

Slicer clear all not working on single select

 

Hi, I'm not getting an option to "erase" selections in slicers when single select is toggled on. I DO see it when it's toggled off, and it looks like my slicer header is on. Is Erase all not an option for single select?

 

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Neutralcats ,

 

 

After testing, the clear icon is not displayed when the slicer is unchecked.

vhenrykmstf_0-1661241607219.png

vhenrykmstf_1-1661241634154.png

If you want to achieve the same effect on a single filter, you can try to create a button, set to clear all filters when clicked, refer to the following blog:

vhenrykmstf_2-1661242053840.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

4 REPLIES 4
logicscience2
Regular Visitor

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 :

 logicscience2_0-1720998148157.png

 

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.

 

 

v-henryk-mstf
Community Support
Community Support

Hi @Neutralcats ,

 

 

After testing, the clear icon is not displayed when the slicer is unchecked.

vhenrykmstf_0-1661241607219.png

vhenrykmstf_1-1661241634154.png

If you want to achieve the same effect on a single filter, you can try to create a button, set to clear all filters when clicked, refer to the following blog:

vhenrykmstf_2-1661242053840.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

MahyarTF
Memorable Member
Memorable Member

Hi,

In Slicer, if you disable the Slicer Header format, the eraser selection is disappeared 

MahyarTF_0-1659928518054.png

MahyarTF_1-1659928530054.png

Mahyartf
ronaldbalza2023
Continued Contributor
Continued Contributor

I think the erase all is not an option for a single select. Have a read on this 😉
Solved: Re: Clear all slicer selection when single select ... - Microsoft Power BI Community

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.