Hi Claudio Don,
It's a pleasure to be able to help you.
Here are the results we've tested so far. You can refer to the following JSON content to see if it helps you.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if(@currentField > @now + 4 * 86400000, '@currentField', if(@currentField > @now + 3 * 86400000, @currentField + 4 * 86400000, if(@currentField > @now + 2 * 86400000, @currentField + 3 * 86400000, if(@currentField > @now + 1 * 86400000, @currentField + 2 * 86400000, if(@currentField > @now, @currentField + 1 * 86400000, if(@currentField - @now < 0, 'OVERDUE', @currentField)))))",
"style": {
"background-color": "=if([$DueDate] > @now + 4 * 86400000, '', if([$DueDate] > @now + 3 * 86400000, 'yellow', if([$DueDate] > @now + 2 * 86400000, '#FED8B1', if([$DueDate] > @now + 1 * 86400000, '#FFCCCB', if([$DueDate] > @now, 'red', if([$DueDate] - @now < 86400000, '#8B0000', ''))))))"
}
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.