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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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