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 / Formula issue - Assign...
Power Apps
Answered

Formula issue - Assigning a Status

(0) ShareShare
ReportReport
Posted on by 161

Hello, I am hoping someone can help me out. I have two dates shown in my app: a Due Date and an Expiration Date. Both are in text labels; see the screenshot below.

SamanthaLavoie_0-1703884443978.png

 

I have added a text label below those dates and I want it to indicate one of three statuses depending on the dates shown: "In Progress", "In Progress - Late", or "Late". 

 

The code I've written somewhat works but there are two problems: 1) it's not accounting for there being a blank date in the text box and shows the status of "In Progress" when the status should be Late because it looks at the blank text box and considers the blank date less than itself. And I don't know how to account for a blank date. 2) It shows the caution triangle and gives the below message when I go to get help with this warning. I'm can't seem to fix it.

SamanthaLavoie_0-1703883396327.png

Here is the code I'm using on the Text Property of the text box selected in the above screenshot. 

 

If(
ThisItem.'DATE REFRESHER MODULE TAKEN'>=ThisItem.'DATE REFRESHER MODULE DUE',"Late - In Progress",
ThisItem.'DATE REFRESHER MODULE TAKEN'<=ThisItem.'DATE REFRESHER MODULE DUE' ,"In Progress",
ThisItem.'DATE REFRESHER MODULE DUE'<Today() And ThisItem.'DATE REFRESHER MODULE TAKEN'=" ", "Late"
)

 

Any help would be greatly appreciated!

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @SamanthaLavoie ,

    Try this

    If(
     ThisItem.'DATE REFRESHER MODULE TAKEN' >= ThisItem.'DATE REFRESHER MODULE DUE',
     "Late - In Progress",
     ThisItem.'DATE REFRESHER MODULE TAKEN' < = ThisItem.'DATE REFRESHER MODULE DUE',
     "In Progress",
     ThisItem.'DATE REFRESHER MODULE DUE' < Today() And Value(ThisItem.'DATE REFRESHER MODULE TAKEN') < 1, 
     "Late"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • SamanthaLavoie Profile Picture
    161 on at

    Thank you for the quick response @WarrenBelz! The code you provided didn't work right away but I rearranged it placing it in the below order and it is now working for all statuses. Rearranging the order had not occurred to me. 

     

    If(
    ThisItem.'DATE REFRESHER MODULE TAKEN' >= ThisItem.'DATE REFRESHER MODULE DUE', "Late - In Progress",
    ThisItem.'DATE REFRESHER MODULE DUE' < Today() And Value(ThisItem.'DATE REFRESHER MODULE TAKEN') < 1, "Late",
    ThisItem.'DATE REFRESHER MODULE TAKEN' <= ThisItem.'DATE REFRESHER MODULE DUE', "In Progress"

    Thanks again for your help, I really appreciate it!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard