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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional Formatting...
Power Apps
Unanswered

Conditional Formatting with Dates

(2) ShareShare
ReportReport
Posted on by 51
Hi, I am trying to conditional format a gallery depending on the dates of an item. As of now, it is formatting every element as if it is < Today(). I am using the following formula:
 
If(
    CurrentTarea.Fecha2 < Today(), Color.Red,
    Color.White
)
 
 
I have tried using both data types DateTime and DateOnly and using Today() and Now() but it is the same result. Any idea why this happens or if I am using the condition wrong?
 
Edit: The condition is not the issue (or not yet) but CurrentTarea only references the selected Item. ThisItem does not seem to be recognized on my app.
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
     
    Make sure you are formatting correctly
     
    like
     
    DateValue(Text(DateValue("3/11/2025"), "dd/mm/yyyy")) < 
    DateValue(Text(DateValue(Today()), "dd/mm/yyyy"))
    Also is this UTC?
     
    make sure your months and days are in the right order, or it will fail and do what its doing to you now
  • JC-15041439-0 Profile Picture
    51 on at
    Hi @Michael E. Gernaey, I think I found out the reason it is not working is because CurrentTarea only references the selected Item rather than check each Item for the condition. I believe I should be using ThisItem, but PowerApps doesn't seem to be recognized. Any idea why this happens?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard