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)

Calculated fields with NULL value returns NULL

(0) ShareShare
ReportReport
Posted on by

I am new to Dynamic 365 CRM and am having issue with the formula in calculated fields. The calculated field is a sum of 5 currency fields and it shows up as NULL if any one of the currency field is NULL. From my research it looks like I have only 2 options

1) Create a workflow to update these fields to $0 on create/update entities.

Note: This may not be ideal for all situations to store $0 for NULLS in all the entities. Also we may need to update the existing records.

2) Create a calculated field for each of the NULL field to store $0 instead of NULL and use the new calculated fields in the formula instead of the original fields.

Note: This sounds logical but adding additional calculated fields for each field in a formula seems to be redundant.

I looked at the available formulas in the calculated fields but looks like there is none for the currency fields. Both these approach has pros and cons, is there a better way to handle NULL's in the calculated fields. 

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    It is best practice to set currency to 0 by default as they are required in calculation.

    One option is to populate these fields to 0 using Business Rules. Have a look at below article.

    http://www.marksgroup.net/blog/dynamics-365-using-business-rules-set-default-values/

    You can run a background workflow to set existing null values to 0 or export all records and re import after setting it to 0 in excel or excel online.

    Thanks, 

    Shoaib

  • Community Member Profile Picture
    on at

    Thanks for the reply Shoaib.

    In our application, we cannot set the currency fields to be $0, for example, for a bank statement, balance of NULL is totally different from $0.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Then you will have to leave idea of code-less solution behind and use plugins for calculations.

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