May 14 2021 02:37 PM
Red – Today is past the Due Date
Amber – Today is fewer than 3 days before the Due Date
Yellow– Today is fewer than 10 days before the Due Date
Green– Today is greater than or equal to 10 days before the Due Date
As you can see in my snip, all rows are showing a red dot, even though there is more than 10 days before the due date. Thank you!
May 17 2021 04:56 AM
Hi @RebeccaBB, you can do this with the following JSON (based on your criteria). Time comparisons in JSON are done in milliseconds.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if([$Due] < @now, '#780909', (if([$Due] >= @now && [$Due] <= @now+259200000, '#e74c3c', (if([$Due] >= @now && [$Due] <= @now+864000000, '#f39c12', '#98a148')))",
"width": "20px",
"border-radius": "25px"
}
}
Which gives the following result:
Rob
Los Gallardos
Intranet, SharePoint, Website and Power Platform Manager (and classic 1967 Morris Traveller driver)
May 21 2021 04:19 PM