Forum Discussion
Traffic Light Dates
Hi,
I would like a column that turns red, yellow, green if today's date is within 0-45 days, 46-60 days, 61+ days, respectively.
See attached screenshot for reference.
Thank you,
Pablo
Hello PabloGiraldo ,
You should add the column in table 'Submittals'.
The formula to use will be the following:
Column Color = SWITCH(TRUE(), DATEDIFF(Submittals[Required date],TODAY(),DAY) <=45,"#FF0000", DATEDIFF(Submittals[Required date],TODAY(),DAY) >45 && DATEDIFF(Submittals[Required date],TODAY(),DAY) <=60,"#FFFF00", DATEDIFF(Submittals[Required date],TODAY(),DAY) >60,"#00B050")I have also attached the file with the color coding applied to field Manager in the table
4 Replies
- themistoklisCommunity Champion
You can create a column and add the following formula:
Column Color = SWITCH(TRUE(), DATEDIFF(Combined_Table[Date],TODAY(),DAY) <=45,"#FF0000", DATEDIFF(Combined_Table[Date],TODAY(),DAY) >45 && DATEDIFF(Combined_Table[Date],TODAY(),DAY) <=60,"#FFFF00", DATEDIFF(Combined_Table[Date],TODAY(),DAY) >60,"#00B050")To display the colours in cells for the field that you require, go to conditional formatting and select format by: Select the Color Column
- PabloGiraldoHelper IV
I am havign trouble with the "Combined Table_Date". I am not able to pick any of my date columns. Not sure why. Link to my pbix below in case you have a sec to look at what im doing wrong.
Thank you!
- themistoklisCommunity Champion
Hello PabloGiraldo ,
You should add the column in table 'Submittals'.
The formula to use will be the following:
Column Color = SWITCH(TRUE(), DATEDIFF(Submittals[Required date],TODAY(),DAY) <=45,"#FF0000", DATEDIFF(Submittals[Required date],TODAY(),DAY) >45 && DATEDIFF(Submittals[Required date],TODAY(),DAY) <=60,"#FFFF00", DATEDIFF(Submittals[Required date],TODAY(),DAY) >60,"#00B050")I have also attached the file with the color coding applied to field Manager in the table