Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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:
2. When i select "Select All' this is the desired output:
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous
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,
Hi @Anonymous
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,
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?
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.
User | Count |
---|---|
84 | |
80 | |
69 | |
46 | |
46 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
39 |