Forum Discussion

Evanooruvan's avatar
Evanooruvan
Icon for Helper II rankHelper II
3 years ago
Solved

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.

  • Anonymous's avatar
    Anonymous
    3 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

  • Anonymous's avatar
    Anonymous
    Not 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's avatar
      Evanooruvan
      Icon for Helper II rankHelper II

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

      • Anonymous's avatar
        Anonymous
        Not 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

    • Wand2023's avatar
      Wand2023
      Regular Visitor
      Excellent, this saved me from unpivoting my data - thanks Neeko!
    • emmssi22's avatar
      emmssi22
      New Member

      Which table is this measure created in?