Forum Discussion
USE MULTIPLE COLUMN AS ONE SLICER
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.
- Anonymous3 years ago
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.
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.
7 Replies
- AnonymousNot applicable
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.
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.
- Evanooruvan
Helper II
thank you, could you please explain what does measure 1 in filter does
- AnonymousNot applicable
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
- Wand2023Regular VisitorExcellent, this saved me from unpivoting my data - thanks Neeko!
- emmssi22New Member
Which table is this measure created in?
- amitchandak
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-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE