Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Calculated field acting strangely

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,054 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,054 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,054 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans