Highlight row based on number of weeks

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I am attempting to create a report that will display any task that has been assigned to be based on the due date in relation to today. I was anything due > than two weeks in the future to be green, anything due in the next two weeks to be orange, and anything overdue to be red. I have tried a few things, but I can't get the weeks function to work because it's a "duration" and not a date. 
Photo of Greg Bearringer

Greg Bearringer

  • 70 Points

Posted 2 years ago

  • 0
  • 1
Photo of melizzza

melizzza

  • 628 Points 500 badge 2x thumb
Maybe you could do "duration" plus "today" to return a date and then plug that into the weeks function?
Try this

IF(
[Due Date] > Today() + Days(14), "green",
[Due Date] >= Today(), "orange",
[Due Date] < Today() + Days(14), "red")

I use Laura's app here to get the hex color codes.
https://laurahillier.quickbase.com/db/bhy8pumuk?a=q&qid=1

For example instead of "green" it would be say "#C1FFC1"

I have not tested if "orange" is a valid color to use as I always choose a hex color code.

When I do use a code, I always comment it
IF(
[Due Date] > Today() + Days(14), "#C1FFC1",  // green
[Due Date] >= Today(), "#FFA500", // orange
[Due Date] < Today() + Days(14), "#FFC0CB") // pink
Photo of melizzza

melizzza

  • 628 Points 500 badge 2x thumb
Yes. This makes more sense. Looking back at my comment, what I said wouldn't even work properly. I was on the right track though haha