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 / Calculated Fields Form...
Power Apps
Suggested Answer

Calculated Fields Formula Help

(0) ShareShare
ReportReport
Posted on by 2
I am trying to calculate the days left in a trial from a specific end date. I feel like I have tried every variation of formula. 
 
These are the fields that I am working with:
Start Date (DateTime)
End Date (Calculated - IF Start Date contains data ACTION Set End Date to AddDays(30, Start Date))
Days Left (Calculated - ??? This is where I am stuck. I need the solution to be a number)
 
Any help would be so appreciated!
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    Assuming the control you are using is in a Form or a Gallery (hence the ThisItem reference) and you are after the end date
    If(
       Value(ThisItem.'Start Date') > 1,
       ThisItem.'Start Date' + 30
    )
    If you are looking for the days left from the current day to the end date
    If(
       Value(ThisItem.'Start Date') > 1,
       DateDiff(
          Today(),
          ThisItem.'Start Date' + 30,
          TimeUnit.Days
       )
    )
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • JH-10042124-0 Profile Picture
    2 on at
    Unfortunately, I am limited to this Calculated Field window.
     
  • Vish WR Profile Picture
    1,102 on at
    Can you try using this approach and see if it works:
     
    DATEDIFF(NOW(), ADDDAYS('First Call Date', 30), DAY)
     
    This should calculate the days between today and your trial end date and return it as a whole number. Let me know if that does the trick!
     
     
     
      Vishnu WR
     
    Please âœ… Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like â™¥
     
     
     
  • WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    I was assuming you were referring to a Power Apps field (this is a Power Apps forum). For a Dynamics 365 calculated field, it would be something like
    DIFFINDAYS(End Date, NOW())
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard