Forum Discussion

msommerf's avatar
msommerf
Helper III
6 years ago
Solved

Conditionally format bar chart column colour based on slicer value

I have the following visuals:   I am looking to change the colour of each bar based on the selection of the Depot slicer. If depot slicer is Depot 1, the Depot 1 bar is highlighted If depot...
  • Icey's avatar
    6 years ago

    Hi msommerf ,

     

    Try this:

     

    1. Create a separate Depot table.

    Depot = VALUES ( 'Table'[Depot] )

     

    2. Create a Measure like so:

    Highlight = IF ( MAX ( 'Table'[Depot] ) = SELECTEDVALUE ( Depot[Depot] ), "Yellow", "Blue" )

     

    3. Set conditional formatting of Data color in Clustered column chart.

     

     

    4. Test.

    For more details, please check the attached PBIX file.

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.