web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change fill color base...
Power Apps
Unanswered

Change fill color based on Date

(0) ShareShare
ReportReport
Posted on by 1,512

I have a column that needs to change color based on dates.

 

For instance:

Due in next 365 days (Green)

Turn yellow if today is past due date by 1 day to 10% over cycle

Turn red if today is past due date by over 10% of cycle

 

The column name is DUE

 

Can you help me figure out how to do this?

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Do you have a field to check those 10% ?

    After that is just a condition:

     

    If(

      DateDiff(ThisItem.Due, Today(), Days)  = 1 && OverCycle = 10% ,

      Yellow, 

      If(

         ThisItem.Due = Today() && OverCycle >= 10%,

          Red,

          NormalColor

          )

    )

     

    Something like that

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Dorinda Profile Picture
    1,512 on at

    @Nogueira1306 

     

    No extra column to capture the 10%, but here are the mockup formula from excel if that helps

     

    GREEN

    If today is >=J135-365 and <=J135

    YELLOW

    if today > J135 and< .10(K135*365)

    RED

    if today is >= J135+.10(K135*365)

     j135 EQUALS ThisItem.Due

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Assuming 10% is 36.5,

     

    bad.PNGgood.PNGok.PNG

     

    COlor of Label in this example is set to

    If(
     DateDiff(DatePicker7.SelectedDate,DatePicker8.SelectedDate,Days)<=0,Green,
     And(
     DateDiff(DatePicker7.SelectedDate,DatePicker8.SelectedDate,Days)>0,
     DateDiff(DatePicker7.SelectedDate,DatePicker8.SelectedDate,Days)<36.5), Yellow,
     Red)
    

     

    Just change datepicker refs out for your refs

  • TheRobRush Profile Picture
    11,128 Moderator on at

    And for a fill, just put this in fill instead of color 🙂

  • Dorinda Profile Picture
    1,512 on at

    @TheRobRush I tried what you gave me and have no YELLOW items they are all showing either red or green.  I am not sure we have this right

    Dorinda_0-1647366772774.png

    This is what is on the Fill Property

    If( DateDiff(Today(),ThisItem.Due,Days)<=0,LightGreen, And( DateDiff(ThisItem.Due,ThisItem.Due,Days)>0, DateDiff(ThisItem.Due,ThisItem.Due,Days)<36.5), Orange, LightCoral)

     

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Nevermidn I see it, start date needs to be ThisItem.Due, THEN today(), swap those around its backwards

  • TheRobRush Profile Picture
    11,128 Moderator on at

    It's always something simple right haha

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard