Forum Discussion

gsed99's avatar
gsed99
Helper III
8 years ago

Use Slicer for multiple different date fields

Hello,

I would like to use a single Slicer to filter on year but have it filter on several different fields, all of which use 4 digit year.

Example - I choose 2018 from the slicer, and MQL Year, SAO Year and SQO Year all filter to 2018.

Is this possible?

Thanks,

Greg

9 Replies

  • jmalone's avatar
    jmalone
    Resolver III

    You might add a Calculated Column with a conditional formula to check that each year field matches.

     

    Something like 

    Slicer Year =
    IF (
        AND (
            [MQL Year] = [SAO Year] ),
            [SQO Year] = [MQL Year] )
        ),
        [MQL Year] ),
        BLANK ()
    )

     

    This new column will give you a Year number if all three fields match. Otherwise it will be blank. You can then use it in your slicer.

    • gsed99's avatar
      gsed99
      Helper III

      Thank you, I think this is close, but I might not of described the use case well enough. I would like the slicer to be selecting one year, but the different metrics don't have to all match. It is more of an OR statement versus an AND statement.

      Does that make sense?

      • v-xjiin-msft's avatar
        v-xjiin-msft
        Solution Sage

        Hi gsed99,

         

        Are these columns in one sample table? If not, you can use Edit Interactions feature to make an OR statement.

         

        If they are in one same table. We can only specify conditions in a measure, a calculated column or a calculated table. It is not possible to specify the interactions with expression for a slicer.

         

        Thanks,
        Xi Jin.