cancel
Showing results for
Did you mean:
Helper III

## Date Calculation Dependant on Value From another Field

Hi there

I hope someone can help me please

I'm building an Agreement app where someone agrees to make a number of payments at an agreed frequency and an agreed amount (£), starting from an agreed date

I the App I will be adding a date field (date someone is starting to make a payment), a frequency of payment (drop down - weekly, fornightly, monthly etc) and a payment value (drop down - £5, £10 etc).

In the app will be another field which I want to be a calculated one based on the start date of paying, the frequency of paying and the value.

So for example

If I owe someone £100, I start paying on Monday 17/4/2023 and I've said I will pay if off £5 per week, I want my calculated field to tell me when my final payment should be, so in this case it would be 28/8/2023

Is that possible to do and if so how please?

Kind regards

Karen

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

Something like this should work:

``DateAdd(StartDate,RoundUp(Amount/Payment)*7,TimeUnit.Days)``

For example: 1 week payments, \$100, \$5 each week

StartDate: Where startdate is 1 week before the first payment. If you want the first payment to be paid on the StartDate change RoundUp(Amount/Payment)*7 to (RoundUp(Amount/Payment)-1)*7

Amount: \$100

Payment: \$5

4 REPLIES 4
Frequent Visitor

Something like this should work:

``DateAdd(StartDate,RoundUp(Amount/Payment)*7,TimeUnit.Days)``

For example: 1 week payments, \$100, \$5 each week

StartDate: Where startdate is 1 week before the first payment. If you want the first payment to be paid on the StartDate change RoundUp(Amount/Payment)*7 to (RoundUp(Amount/Payment)-1)*7

Amount: \$100

Payment: \$5

Helper III

Hi @denz

Thank you for getting back to me.

That's ace, thank you, i'll give it a whirl and let you know 🙂

Kind regards

Karen

Helper III

Hi @denz

Sorry another couple of q's. Would this formula need to go in to a blank field and would it go in the ThisItem and would it show as a date

Kind regards

Karen

Helper III

Hi @denz

All sorted, worked a treat, thank you 😊

Everday is a learning day. 😊

Kind regards

Karen

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA