Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi guys one query
states | categories
MH | water
MH | food
MH | IT
AP | IT
AP | food
KA | water
TS | IT
i have one table in Power BI desktop in which i added a multi select slicer (water , food, IT ) and in default case if is select water and food then states will come like (MH ,MH , AP ,KA) , here Or operation is happed between multiselected value like water or food. But in my case I needed like water and food and output should be (MH, MH ) because MH is only state having both water and food.
How to do this
Solved! Go to Solution.
You can refer to the following solution.
Sample data
Slicer table
Create the following measures.
Conbine = CONCATENATEX(FILTER(ALLSELECTED('Table'),[States] in VALUES('Table'[States])),[Categories],",")
Flag =
VAR _count =
COUNTROWS (
FILTER (
VALUES ( SlicerTable[Categories] ),
CONTAINSSTRING ( [Conbine], [Categories] )
)
)
RETURN
IF (
ISFILTERED ( SlicerTable[Categories] ),
IF (
_count = COUNTROWS ( VALUES ( SlicerTable[Categories] ) )
&& SELECTEDVALUE ( 'Table'[Categories] ) IN VALUES ( SlicerTable[Categories] ),
1,
0
),
1
)
Then put the flag measure to the visual filter.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
You can refer to the following solution.
Sample data
Slicer table
Create the following measures.
Conbine = CONCATENATEX(FILTER(ALLSELECTED('Table'),[States] in VALUES('Table'[States])),[Categories],",")
Flag =
VAR _count =
COUNTROWS (
FILTER (
VALUES ( SlicerTable[Categories] ),
CONTAINSSTRING ( [Conbine], [Categories] )
)
)
RETURN
IF (
ISFILTERED ( SlicerTable[Categories] ),
IF (
_count = COUNTROWS ( VALUES ( SlicerTable[Categories] ) )
&& SELECTEDVALUE ( 'Table'[Categories] ) IN VALUES ( SlicerTable[Categories] ),
1,
0
),
1
)
Then put the flag measure to the visual filter.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
64 | |
59 | |
47 | |
32 | |
31 |
User | Count |
---|---|
84 | |
73 | |
52 | |
50 | |
44 |