Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Calculated field acting strangely

(0) ShareShare
ReportReport
Posted on by 1,760

Hi All

I have configured a calculated field to calculate the next birthday on a contact. Here is the formula:

AddYears(1, new_dateofbirththisyear)

it works fine for all dates except for those that fall on the 26 or 27th of march (any year) oddly. does anyone have any ideas. If it helps the behavior of the field is user local and the format is date only

Errors:

1565.Error-1.PNG

2677.Error.PNG

working fine

5756.working.PNG

  • Suggested answer
    Nya Profile Picture
    Nya 29,056 on at
    RE: Calculated field acting strangely

    Hi,

    Yes, it cannot be reverted directly.

    But you can create 2 new fields to test if it works.

  • T.I.A Profile Picture
    T.I.A 1,760 on at
    RE: Calculated field acting strangely

    Only thing is once I do this I won't be able to revert the change.

  • Nya Profile Picture
    Nya 29,056 on at
    RE: Calculated field acting strangely

    Hi,

    Please try to switch the option into "Date only" and find if the error still exists.

  • T.I.A Profile Picture
    T.I.A 1,760 on at
    RE: Calculated field acting strangely

    correct. date of birth this year and next year will be calculated fields. the behavior for all fields is user local. Also how do you take into a consideration if a birthday falls on a leap year?

  • Nya Profile Picture
    Nya 29,056 on at
    RE: Calculated field acting strangely

    Hi,

    I created a calculated field that adds a year directly to the birthday field.

    But it can work normally.

    pastedimage1633571999729v1.png

    I noticed that in your expression there is another custom field "new_dateofbirththisyear".

    Is it a calculated field?

    If yes, will the value of this field have the same problem?

    Also, I'd like to confirm the next properties of the two fields. - "new_dateofbirththisyear" and "Next birthday".

    pastedimage1633572235687v2.png

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans