cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Need help with slicer "Select All" option.

Hi Team,

 

I need a little help with slicer.

 

I've a slicer which consists of multiple values. So when i select on a single value from the slicer it should display the respective result. But when I use "select all" option it should display on the card "All".

For your reference: 

1. When i select a single option:

Capture.PNG

2. When i select "Select All' this is the desired output:

 

Capture.PNG

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Need help with slicer "Select All" option.

Hi @valentina14 

You may try below measure:

Measure =
VAR a =
    CALCULATE ( DISTINCTCOUNT ( Table1[city] ), ALLSELECTED ( Table1 ) )
VAR b =
    CALCULATE ( DISTINCTCOUNT ( Table1[city] ), ALL ( Table1 ) )
RETURN
    IF ( a = b, "ALL", MAX ( Table1[city] ) )

Regards,

Community Support Team _ Cherie Chen
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

3 REPLIES 3
Highlighted
Anonymous
Not applicable

Re: Need help with slicer "Select All" option.

Hi Valentina,

 

The solution is to create a measure that provides that information. There are several options/ways to do this and several considerations. have a look at this great article.

Highlighted
Microsoft
Microsoft

Re: Need help with slicer "Select All" option.

Hi @valentina14 

You may try below measure:

Measure =
VAR a =
    CALCULATE ( DISTINCTCOUNT ( Table1[city] ), ALLSELECTED ( Table1 ) )
VAR b =
    CALCULATE ( DISTINCTCOUNT ( Table1[city] ), ALL ( Table1 ) )
RETURN
    IF ( a = b, "ALL", MAX ( Table1[city] ) )

Regards,

Community Support Team _ Cherie Chen
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

Highlighted
Helper I
Helper I

Re: Need help with slicer "Select All" option.

HI, i need to use the same dax :

FILTER_label =
VAR a =
CALCULATE ( DISTINCTCOUNT ( TABLE[PRODUCT] ), ALLSELECTED ( TABLE) )
VAR b =
CALCULATE ( DISTINCTCOUNT ( TABLE[PRODUCT] ), ALL ( TABLE ) )
RETURN
IF ( a = b, "MASTER", TABLE[PRODUCT])

 

My B value is 71 and never change even when I choose any PRODUCT from Slicer, that's ok , and A value change depend of what PRODUCT I select (67, 4, etc) that's ok,  but the IF stay in MASTER, never change. Any suggest?

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors