Forum Discussion

srk_powerbi's avatar
srk_powerbi
Icon for Helper II rankHelper II
5 years ago
Solved

conditional formatting for table positive and negative numbers

hi,

I am trying to apply conditional formatting for icons for a measure columnin table. it should show For positive values, green up arrow, for '0' value  yellow icon and for negative values red icon. What should be the 'Rule' in the conditional format settings? i tried different settings but not working.

pls help..

 

 

  • v-jingzhang's avatar
    v-jingzhang
    5 years ago

    Hi srk_powerbi 

    You can add a measure in the model to help set conditional formatting. For example,

    Icon measure = 
    SWITCH (
        TRUE (),
        [Difference] > 0, 1,
        [Difference] = 0, 0,
        [Difference] < 0, -1
    )

    [Difference] is the measure in the table which this icon formatting should be based on. Then set it up like below.

    Result:

     

    Kindly let me know if this helps.
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

4 Replies

      • v-jingzhang's avatar
        v-jingzhang
        Icon for Community Support rankCommunity Support

        Hi srk_powerbi 

        You can add a measure in the model to help set conditional formatting. For example,

        Icon measure = 
        SWITCH (
            TRUE (),
            [Difference] > 0, 1,
            [Difference] = 0, 0,
            [Difference] < 0, -1
        )

        [Difference] is the measure in the table which this icon formatting should be based on. Then set it up like below.

        Result:

         

        Kindly let me know if this helps.
        Community Support Team _ Jing
        If this post helps, please Accept it as the solution to help other members find it.