Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Conditional Formatting font text Amber

Is there a way to change the font colour of a text column [BRAG STATUS] with the values "Green", "Amber" & "Red"

 

I'm able to use conditional formatting to get a value by field for the first values (see pic attached) but it doesn't pick up the amber colour:

I've even tried to use a switch function to change the HEX colours but I still cant quite get it

 

Conditional Colour Format = SWITCH(TRUE(),MAX(audit_results[BRAG STATUS])="Green",1,MAX(audit_results[BRAG STATUS])="Amber",2,MAX(audit_results[BRAG STATUS])="Red",3)

 

Any help on this would be great!

 

Thanks,

  • Anonymous 

     

     

    BRAG STATUS Column2
    Red 1
    Amber 2
    Green 3
    Red 4
    Amber 5
    Green 6
    Red 2

     

    DAX measure

     

    Conditional_Colour_Format =
    VAR __status =
        CALCULATE ( FIRSTNONBLANK ( audit_results[BRAG STATUS], TRUE () ) )
    VAR __color =
        SWITCH ( __status, "Green", "#4CAF50", "Amber", "#FFC107", "Red", "#f44336" )
    RETURN
        __color

     

     
     

4 Replies