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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
pfr1992
Frequent Visitor

Disable All selection in slicer

 

Hello everyone , I have a slicer that selects several regions , however ,
not like he selecionasse all regions , because each region has a different value and it is not possible to make an average with these values. There is a function in the slicer to disable the " select all " ??
thank you

8 REPLIES 8
grazitti_sapna
Resolver I
Resolver I

Hey,

You can try to disable the "select all" by creating two measures.

Like this:- 

Measure_1 = if(HASONEVALUE(column_name), "", "’ Select a Single value")

Measure_2 = if(HASONEVALUE(column_name), 1, 0)

 

This will help you to get the desired output.

Hope this will help.

 

v-haibl-msft
Employee
Employee

@pfr1992

 

I’m not sure your ultimate goal. But if you only want to get the average value for selected Gerencia, you can add an average line in Analytics pane as below.

 

Disable All selection in slicer_1.jpg

 

Best Regards,

Herbert

Anonymous
Not applicable

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 all the data. 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.

 

Great workaround, this is really handy and I've now used this for various other reasons not just for throwing up error messages. 

@Anonymous This does not work when we have slicer as slider (when we are displaying it as between). Can you please suggest something that works on slider as well.

@pfr1992 I don't know if I'm answering your question, but "Select All" is a formatting option that you should have the ability to turn on and off...

selectall.JPG


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG


@Eno1978 wrote:

@pfr1992 I don't know if I'm answering your question, but "Select All" is a formatting option that you should have the ability to turn on and off...

 


foto1.jpg

The problem is this : When you have an option selected it shows me the values ​​of this region that I am selecting . As I show in the image below ...




 

 

 

foto2.jpg

when I double click this option clears and ends up showing all the regions . Each region has a specific value , then I can not select all at once because then the graph will be wrong. There is an option that exiting this function to " select all " ?? thank you



 

 

   

@pfr1992 I think I understand now. The default behaviour is to show everything. What you want is to only show the visuals if you have selected a value in the slicer. I don't have a direct example, but this post is a similiar question. The solution will require some modification or development in DAX.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.