Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dynamic Conditional Formatting Based On Previous Year

Hello there, Could I get assistance with conditional formatting. I need to be able to change colors based on previous year.  So, if the amount last year is greater than this year then I would like t...
  • jdbuchanan71's avatar
    7 years ago

    Hello Anonymous 

    You can write a measure to apply the formatting.

    FORMAT Sales Amount = IF ( [Sales Amount] > [Sales Last Year], "GREEN", "RED")

    The use it in conditional fomatting to color the text.

    You would just need a formatting measure for each column but it should work in all contexts.

    FORMAT Sales Last Year = IF ( [Sales Amount] < [Sales Last Year], "GREEN", "RED")