Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
haykp
Helper I
Helper I

Combine different measures into 1 Slicer

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)

 

haykp_0-1692812799385.png

 

 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

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @haykp ,

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1692933176718.png

(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.

vtangjiemsft_0-1692941570000.png

 

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.

haykp_0-1692971865415.png

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. 

vtangjiemsft_0-1693204962552.png

(2)Through my tests it worked.

vtangjiemsft_1-1693206696075.pngvtangjiemsft_2-1693206712142.png

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. 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.