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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans