Traffic Light Format for Dates

Hi Everyone,

Im looking at trying to create a traffic light format rule for scheduled sessions in my app.

Today or in the future = Green | [Latest Session] >= TODAY()
I week in the past = Yellow | [Latest Session] < TODAY() - 7
Older than one week but not including the previous week = Red | I cant seem to get this one to work It keeps overriding the previous rule.

Does anyone have any suggestions?

0 6 236
  • UX
6 REPLIES 6

So not -7 but -14???

[Latest Session] < TODAY() - 14


Format rules are applied from the bottom up - meaning:

I would put your red one at the top of the list (making it the last thing to be applied) and your others below that - meaning they are applied first.

Hey Thanks for that, that seems to do the job, the date that is older than one week has both yellow and red. Not a massive issue but is there no stop if true that can be applied so that it will only display the red tick on those older dates.

Ah, youโ€™ll need to apply two date limits for that middle condition:

and(
  [Latest Session] < today(), 
  [Latest Session] >= today() - 7
)

If you think about the original statement for the yellow condition, you simply said it needs to be less than 7 days old - that includes something 1,543 days old.

Ohhhh thanks so much for that. I think i might be on this forum quite a bit. I Really appreciate your help.

@Ben_Rix Youโ€™re welcome

This forum has been a lifesaver for me the past 10 months or so.

Top Labels in this Space