Forum Discussion
DAX Filter
- 4 years ago
Hi Anonymous
Your request is a little bit tricky😎 .
Please download this file and I hope this cover all your requirements: https://gofile.io/d/Ta9o4y
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/ - 4 years ago
Hi,
According to your description, I can clearly understand your requirement, I think you can achieve this using a calculated table for the slicer and a measure as the flag for the visual filter, you can try my steps:
- Create a table like this:
Slicer = 'Table'- Create a measure like this:
Flag = var _selected=SELECTEDVALUE(Slicer[Item]) return SWITCH( _selected, "A",IF(MAX('Table'[Item]) in {"A","AB"},1,0), "B",if(MAX('Table'[Item]) in {"B","AB"},1,0), "C",IF(MAX('Table'[Item])="C",1,0), "AB",IF(MAX('Table'[Item])="AB",1,0) )Then you can create a slicer and a table chart to place the visual filter like this:
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
According to your description, I can clearly understand your requirement, I think you can achieve this using a calculated table for the slicer and a measure as the flag for the visual filter, you can try my steps:
- Create a table like this:
Slicer = 'Table'
- Create a measure like this:
Flag =
var _selected=SELECTEDVALUE(Slicer[Item])
return
SWITCH(
_selected,
"A",IF(MAX('Table'[Item]) in {"A","AB"},1,0),
"B",if(MAX('Table'[Item]) in {"B","AB"},1,0),
"C",IF(MAX('Table'[Item])="C",1,0),
"AB",IF(MAX('Table'[Item])="AB",1,0)
)
Then you can create a slicer and a table chart to place the visual filter like this:
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That was perfect, thank you for your help v-robertq-msft.