Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Conditional Formatting based on weekly data

Hello I want to asked how to do conditional formatting on weekly data. I want the background would be red if any week is less than previous week and the background would be green if its greater.  ...
  • joaoribeiro's avatar
    2 years ago

    Hi Anonymous ,

     

    You can use a custom measure to calculate the differences between weeks and assign a color code to each result, and then use this measure in the conditional formatting using the option 'Field Value' (please refer to image below).


    An example of a custom measure for color coding:

    Color Coding = 
    
    SWITCH(
        TRUE(),
        [This Week] < [Last Week], "#DC143C" // Red
        [This Week] > [Last Week], "#85cc18" // Green
        [This Week] = [Last Week], "#0c0c0c" // Black
    )

     

    Hope this answer solves your problem!
    If you need any additional help please @ me in your reply.
    If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

    Thanks!

    Best regards,
    Joao Ribeiro