Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
5 years ago
Solved

Slicer & Condtional Formating

if i have a measure that returns a total volume. could i have a conditional formatting with a rule depending on the slicer filter select at the time ?
  • v-kelly-msft's avatar
    5 years ago

    Hi  NewbieJono ,

     

    You need to create a slicer table first.

    For example,I made a sample table as below:

     

    First create a slicer table as below:

    slicer table = VALUES('Table'[category])

    Then create a measure as below:

    Measure 2 = 
    SWITCH(
        SELECTEDVALUE('slicer table'[category]),
        "a",1,
        "b",2,
        "c",3,
        BLANK(),4)

    Create a contional formatting as below:

     

    And you will see:

     

    For the sample .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!