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.
Dear Community,
Can someone please help me implement one smart filter in PowerBI.
I think with DAX it is possible to do, thus posting here.
So I have several slicers, which only TRUE values are interesitng.
And I want to combine these seperate slicers - Suspect, Unplanned,... into 1 slicer, something like this:
( each of them is seperate measure)
So 1 Filter slicer, which contains these measures. And when in Filter section, user select Suspect, it shows only the Suspect=True values.
Is there any ideas how I can do this?
I read and tries so many google posts, that now lost a hope to accomplish this 😞
Thanks
Hayk
Hi @haykp ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2)Create a slicer table.
Slicer = {"Suspect","Unplanned","Unimplemented","Not Reviewed"}
(3) We can create a measure.
Flag = SWITCH(TRUE(),
SELECTEDVALUE('Slicer'[Filter])="Suspect" && MAX('Data'[Suspect])="TRUE",1,
SELECTEDVALUE('Slicer'[Filter])="Unplanned" && MAX('Data'[Unplanned])="TRUE",1,
SELECTEDVALUE('Slicer'[Filter])="Unimplemented" && MAX('Data'[Unimplemented])="TRUE",1,
SELECTEDVALUE('Slicer'[Filter])="Not Reviewed" && MAX('Data'[Not Reviewed])="TRUE",1,
ISFILTERED(Slicer[Filter])=FALSE(),1,0)
(4) Place [Flag]=1 on the visual object filter.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear Neeko Tang,
Thank you very much for your help.
You know, when I make standalone same example as you have provided then it works good.
But when I integrate the logic into my Query, it stop working.
And I cannot undertand why.
I think the reason is that I have multiple Filter sections like Pass, Open, Fail and the Flag does not have any affect on them.
When I select any field from Filter, nothing is happening.
Or another reason can be that another thing, the Filter value is always 1.
Do you have any ideas what is hapenning please?
Hi @haykp ,
(1) This is my test data.
(2)Through my tests it worked.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
52 | |
46 | |
15 | |
12 |