Status Indicator Column based on “Due Date”

Many a times we need to show Status indicator in SharePoint list, specially in custom list. It is east but not OOB field. It can be achieved using Calculated column.
The idea is, we will add the calculated column,where calculated column will compare the Due Date field with Today’s date and based on the result days, it will compose one DIV and CSS will present the color code. Let’s see how?

Let say you already have column called “Due Date” (Date).

Condition is if there is 1 to go =Red, 2 days to go=Blue, more than equal to 3 days Green else Yellow (which would be never a case)

Step 1: Add calculated column let say “Indicator”

Step 2: Add this in condition text box
=”

=3,”Green”,IF([Due Date]-Today()=2,”Blue”,IF([Due Date]-Today()=1,”Red”,”Yellow”)))&”;’>•

You are done. Wait for while, it will give you result as plain string on the list view.

To render as HTML, you need to set the Calculated field type as “Number” instead of Single line text.

This will work on normal view as well as Datasheet view.

Enjoy!