cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KirstenD
Frequent Visitor

DateAdd not working in Formula Column in Dataverse for Teams

I've followed the instructions on the Microsoft page about functions that can be used in Dataverse for Teams, and it's not working.

 

I have a field [LastReviewDate] with the Date (Date Only) of the last time we reviewed the supplier, and a calculated field [ReviewFrequency] with the frequency in years that we need to do a review, and would like to calculate the next review date.

 

I've tried:

DateAdd(LastReviewDate,ReviewFrequency,TimeUnit.Years) - looks good, no errors with the code but when I create the column I get: 
"There was a problem creating or updating your column 'NextReviewDate'. Please try again."

 

I've tried:

DateAdd(LastReviewDate,Value(ReviewFrequency),TimeUnit.Years) and DateAdd(LastReviewDate,4,TimeUnit.Years) - same thing, so it's not the calculated frequency.
 
If I use DateAdd(LastReviewDate,4,Years) like the MS docs say, it says
"Name isn't valid. 'Years' isn't recognized." And it prompts me to use that "TimeUnit.Years" part when I'm building the formula, so I think that's got to be correct?
 
Anywho, this seems like such a simple formula and I think I've tried everything, so I'm hoping someone sees or knows something that I don't.
Thanks in advance!
1 ACCEPTED SOLUTION

Accepted Solutions
KirstenD
Frequent Visitor

It was a programming issue on Microsoft's side where the DateAdd function was creating text instead of a date. They pushed some updates and fixed the issue now.

View solution in original post

3 REPLIES 3
Jeff_Thorpe
Super User
Super User

The calculated column NextReviewDate can't reference ReviewFrequency in its formula because it is also a calculated column. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

I've already tried replacing that with a hard-coded number and still get the same errors/issues.

"DateAdd(LastReviewDate,4,TimeUnit.Years) - same thing, so it's not the calculated frequency."

KirstenD
Frequent Visitor

It was a programming issue on Microsoft's side where the DateAdd function was creating text instead of a date. They pushed some updates and fixed the issue now.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Users online (5,481)