Forum Discussion

JaredHarless's avatar
JaredHarless
Qrew Member
3 years ago

Color Coding Based on Date

Hi, 

I'm fairly new to using Quickbase and have limited programming knowledge. I'm trying to color code lines in a report by date. I have two fields, "Days Till Closing", and "Est Closing Date". Est closing date is our estimated closing date and Days till closing is a countdown based on our est closing date. I want to color code a line in the report red if Days till closing is less than or equal to a certain number and green if its not. Not sure the best way to do this. 

Thank you!

------------------------------
Jared Harless
------------------------------

1 Reply

  • Hi Jared,

    If your Days till closing field is the one you want to have control the color coding on your report, and if that field is a Duration field, you probably want a formula like

    If([Days till closing]>=Days(3), "#3cc151",
    [Days till closing<=Days(2), "#f54400", "")

    You would go into the settings for the report you want this colorization to show up on and find the header for Color Coding and select the by formula option, then you can drop your formula into the formula box that will appear. You can also change the number of days by adjusting the number inside the parenthesis after days and you can change the color to any hex code color by changing the number that appears. There are a lot of colors to choose from using hex codes so you can customize to fit your needs but this is just a very basic example colorization formula. You may also need to change the field name to match the actual name of our field.

    ------------------------------
    Evan Martinez
    ------------------------------