web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Why do calculated fields not work if one factor has a 0 value?

(0) ShareShare
ReportReport
Posted on by

I have a calculated field that does this:

A = B - (C+D)

All of the fields being used are USD currency.   If C or D have a $0.00 balance, the calculated field shows nothing.  Once I put > 0.00 in the field, then the calculation works.  Why is this?

*This post is locked for comments

I have the same question (0)
  • Cyclefitness Profile Picture
    on at

    Well, one issue I discovered is my Field Security Profiles seem to ignore that I'm an Administrator.  Unless a member of the Team specified in the Field Security Profile or a specified User, the calculated fields behave crazy.  I added myself and now it updates, but the totals are still really weird.

  • Cyclefitness Profile Picture
    on at

    Here's what I have:

    836256.1.png

    AVAILABLE = Start $ - (Payments $ + Encumbered $).

    I'm figuring that result should be $1,311.  It's adding the Total Payment negative amount rather than subtracting.  This is some crazy math thing, I'm sure.  ;-)

  • Cyclefitness Profile Picture
    on at

    But then if you look at this group of numbers -- on the same form -- this AVAILABLE amt is correct.  It's processing the negative correctly.  AVAILABLE = (Payments $ + Encumbered $)

    :66760.1.png

    Same formula as in the previous post:

    66760.1.png

    It's late and I'm tired, but I don't think I'm really that bad at math.

  • Cyclefitness Profile Picture
    on at

    And then this screenshot is another record on the same entity.  WHAT GIVES here???

    2350.1.png

  • Suggested answer
    Teddyable Profile Picture
    155 on at

    Calculated field can be very annoying, if you miss a minor detail.

    but sometimes it pays to go back to basics, have a look at this links, it helped me when i had a similar headache

    msdn.microsoft.com/.../dn817863.aspx

    www.preact.co.uk/.../working-with-calculated-fields-in-microsoft-dynamics-crm

    www.youtube.com/watch

    hope it sort of helps

  • Cyclefitness Profile Picture
    on at

    Thanks for the info, Teddy.  I've read through everything and don't find anything that explains the inconsistent behavior.  

  • Cyclefitness Profile Picture
    on at

    Hi Guido!  

    I'm unfamiliar with the | in your syntax.  Is that something to literally add to the equation?

    Oh, and if I only knew JS to be able to do that. ;-)  And if JS was implemented, then the values would only update on form load, correct?  Doesn't a calculated field also update if a report is run against it?

  • Cyclefitness Profile Picture
    on at

    Guido ... also in the second example I just don't understand why there is no value in AVAILABLE?  It, too, should be displaying a negative number.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans