Forum Discussion
Joining and Filtering
- 4 years ago
Hi a11smiles ,
1 Create a table for slicer contains fruit,vegetable,orange, red and green.
2 Create a matrix table then ID, Food in the rows and options in the columns.
3 Create a measure like this:
Measure = VAR _1 = SELECTEDVALUE ( 'Food Table'[ID] ) RETURN SWITCH ( SELECTEDVALUE ( Slicer[options] ), "fruit", IF ( _1 IN VALUES ( Fruits[ID] ), 1 ), "vegetable", IF ( _1 IN VALUES ( Vegetables[ID] ), 1 ), "red", IF ( _1 IN VALUES ( Red[ID] ), 1 ), "orange", IF ( _1 IN VALUES ( Orange[ID] ), 1 ), "green", IF ( _1 IN VALUES ( Green[ID] ), 1 ) )Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi a11smiles ,
1 Create a table for slicer contains fruit,vegetable,orange, red and green.
2 Create a matrix table then ID, Food in the rows and options in the columns.
3 Create a measure like this:
Measure =
VAR _1 =
SELECTEDVALUE ( 'Food Table'[ID] )
RETURN
SWITCH (
SELECTEDVALUE ( Slicer[options] ),
"fruit", IF ( _1 IN VALUES ( Fruits[ID] ), 1 ),
"vegetable", IF ( _1 IN VALUES ( Vegetables[ID] ), 1 ),
"red", IF ( _1 IN VALUES ( Red[ID] ), 1 ),
"orange", IF ( _1 IN VALUES ( Orange[ID] ), 1 ),
"green", IF ( _1 IN VALUES ( Green[ID] ), 1 )
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.