Forum Discussion

GregBearringer's avatar
GregBearringer
Qrew Member
7 years ago

Highlight row based on number of weeks

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. 

3 Replies

  • 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
    • MelissaDoran's avatar
      MelissaDoran
      Qrew Cadet
      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