Sharepoint Lists - Change background color when the date comes after another date in a differnt column

Cody 1 Reputation point
2021-09-27T16:12:22.967+00:00

I have been fighting this for days and can't find the solution. I am trying to compare two date columns. If the date comes before the other column it will show green. If it comes after that other column then it will show yellow. I am basically comparing two different column dates and depending on where the date falls it formats the background accordingly. Can someone please help? This determines whether or not I use this as a tool. So far, I can only get it to show a single color no matter the date in the column I am comparing it to.

In the example shown I am trying to compare the right column to the left. If it comes before or the same day to the left column then it should be green. If it is after, then yellow. Left column [Tech Package Draft Target] Right column [Tech Package Draft Actual].

135579-image.png

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,801 Reputation points
    2021-09-28T07:37:23.373+00:00

    Hi @Cody , welcome to Q&A forum!

    There is a workaround, you can try it and let's know the result.

    First, create a calculated column named Status and use a simple judgment formula:

    =IF([Tech Package Draft Actual]<[Tech Package Draft Target],"Green","Yellow")  
    

    Then create two conditional rules:
    135760-75.png

    135831-76.png

    Result:

    135818-77.png


    If the answer is helpful, please click "Accept Answer" and upvote it.

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.