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
Evanooruvan
Helper II
Helper II

USE MULTIPLE COLUMN AS ONE SLICER

Evanooruvan_0-1673864081670.png

 

The blue table is my data,

1. I want a slicer with those 3 column like the yellow highlighted

2.when i select 0 to 30 days errors in my slicer it should filter 0 out of the 0 to 30 days errors column and show only non-zero values

same with other two columns as well.

kindly please share your thoughts on how to proceed.

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @Evanooruvan ,

 

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

(1)  My test data is the same as yours.

(2) We can create a table. 

For Slicer = { "0 to 30 days errors",
"30 to 60 days errors",
"greater than 90 days errors"}

(3) We can create a measure. 

Measure = 
SWITCH(TRUE(),
NOT(ISFILTERED('For Slicer'[Value])),1,
SELECTEDVALUE('For Slicer'[Value])="0 to 30 days errors"&&MAX('Table'[0 to 30 days errors])>0,1,
SELECTEDVALUE('For Slicer'[Value])="30 to 60 days errors"&&MAX('Table'[30 to 60 days errors])>0,1,
SELECTEDVALUE('For Slicer'[Value])="greater than 90 days errors"&&MAX('Table'[greater than 90 days errors])>0,1)

(3) Then the result is as follows.

Picture1.png

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. 

View solution in original post

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @Evanooruvan ,

 

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

(1)  My test data is the same as yours.

(2) We can create a table. 

For Slicer = { "0 to 30 days errors",
"30 to 60 days errors",
"greater than 90 days errors"}

(3) We can create a measure. 

Measure = 
SWITCH(TRUE(),
NOT(ISFILTERED('For Slicer'[Value])),1,
SELECTEDVALUE('For Slicer'[Value])="0 to 30 days errors"&&MAX('Table'[0 to 30 days errors])>0,1,
SELECTEDVALUE('For Slicer'[Value])="30 to 60 days errors"&&MAX('Table'[30 to 60 days errors])>0,1,
SELECTEDVALUE('For Slicer'[Value])="greater than 90 days errors"&&MAX('Table'[greater than 90 days errors])>0,1)

(3) Then the result is as follows.

Picture1.png

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. 

Which table is this measure created in?

 

Excellent, this saved me from unpivoting my data - thanks Neeko!

thank you, could you please explain what does measure 1 in filter does

Hi @Evanooruvan ,

 

Selecting the "0 to 30 days errors" column in the slicer will only display non-0 values for that column (as are the other two columns), and [Measure] will output 1 if it satisfies these cases, so conversely, when [Measure] is fixed to 1, these cases can be displayed on the visual.

 

Best Regards,

Neeko Tang

amitchandak
Super User
Super User

@Evanooruvan , Check if Field parameters can help

 

Power BI- Create dynamic slicers using field parameters: https://youtu.be/H2ZxWaHAJZQ

 

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

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.