Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Conditional Formatting for Bar Charts

Hi All. I am currently banging my head trying to get what I thought was a simple conditional formatting (RAG indicator) to appear on a single bar chart. Thanks in advance if someone can point me in t...
  • Mariusz's avatar
    7 years ago

    Hi Anonymous 

    You could create a measure like below, essentially its your rules with colours replaced with numbers. 

    coloursX = 
    SWITCH(
        TRUE,
        [Enabled 2019/20] >= [Savings Targets 2019/20], 1, --Blue 
        [Enabled 2019/20] >= [2019/20 Current Month Target], 2, -- Green
        MONTH( EDATE( NOW(), -3 ) ) < 7 && [Enabled 2019/20] >= ( [2019/20 Current Month Target] * 0.7 ), 3, --Amber
        0 --Red
    )

    Next, in the Visualization Pane > Format > Data Colors, Click on the 3 dots and Select Conditional Formating to open the options ( as on the sreenshot below ) 

    Once in the Conditional Formatting settings, just make sure you set everything  as below

     

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski