Hi
I have a slicer below and want to achieve the following scenarios. Currently I have this measure, not sure how I can improve it
Scenarios
Regards,
BK
Solved! Go to Solution.
Hi @beekee
try this measure
Measure =
var _selvalue=SELECTEDVALUE('Table'[Option])
var _countAll=CALCULATE(COUNTROWS('Table'),ALL('Table'))
var _countSel=CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))
return
SWITCH(TRUE(),
_countSel=0,1,
_countSel=_countAll,1,
_countSel=1&&_selvalue="Eraser",1,
COUNTROWS('Table')=2&&COUNTROWS(INTERSECT(ALLSELECTED('Table'[Option]), FILTER('Table','Table'[Option] in {"Chair", "Eraser"})))=2,1,
0)
result
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @beekee
try this measure
Measure =
var _selvalue=SELECTEDVALUE('Table'[Option])
var _countAll=CALCULATE(COUNTROWS('Table'),ALL('Table'))
var _countSel=CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))
return
SWITCH(TRUE(),
_countSel=0,1,
_countSel=_countAll,1,
_countSel=1&&_selvalue="Eraser",1,
COUNTROWS('Table')=2&&COUNTROWS(INTERSECT(ALLSELECTED('Table'[Option]), FILTER('Table','Table'[Option] in {"Chair", "Eraser"})))=2,1,
0)
result
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @beekee ,
I am not sure if I understand the query here.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Thanks,
Pragati
Hi @Pragati11
Basically what I'm trying to do is to return 1 whenever Eraser is being selected in the Option slicer.
When Select All is selected in Option slicer, the measure should return 1.
When Select All is not selected in Option slicer, the measure should return 1.
When Eraser is selected in Option slicer, the measure should return 1.
When Eraser and Chair is selected Option slicer, the measure should return 1.
Regards,
BK
User | Count |
---|---|
365 | |
100 | |
67 | |
56 | |
47 |
User | Count |
---|---|
329 | |
113 | |
86 | |
75 | |
62 |