Forum Discussion

Fali324's avatar
Fali324
Helper II
1 year ago
Solved

Colour using dax

Hi,   I have the following dax, I would like to colour the text green if it is above 0% and Red if it is a minus %   Var percentagedifferance =     FORMAT(         DIVIDE(contingencyremaining...
  • dharmendars007's avatar
    1 year ago

    Hello Fali324 , 

     

    Please copy the DAX formula below, because in your formula you are using Format which converts the Percent value to text, so remove the Format and apply divide and go to "FX" option where you want to apply condtional formatting like "Title" or "values" and from there select "Field Value" and select the below formula.

     

    Var percentagedifferance =
        If(
            DIVIDE(contingencyremaining,contingencytotal)<0, "Red", "Green")
    Return
    percentagedifferance
     

    If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

     

    Thank You

    Dharmendar S

    LinkedIN