Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 @Anonymous
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 @Anonymous
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 @Anonymous ,
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |