• Home
  • Blog
  • About Me
  • Home
  • Blog
  • About Me
Dataverse  ·  Dynamics 365

How to handle Nulls in Dataverse Calculated Fields

By Joe Gill  Published On 1st August 2016

One of the little wrinkles with Dataverse calculated fields is that they cannot handle nulls and so if one of the values in the calculation is null then the calculated field value is null. 

Calculated Fields displaying null value


In this example, I have four custom fields on the opportunity entity to track the customer’s estimated sales by quarter.

Calculated Fields underlying fields

The calculated field that totals the four custom fields.

A way to avoid this is to create a calculated field for each nullable sales field. This new calculated field returns zero if the sales field does not contain data.

Calculated Fields Check If Null

I will then use the new fields in the total calculation field.

The total is now calculated even if the user does not enter values for all four sales quarters. I like this approach as it does not require any coding or populating nullable fields with zero values unnecessarily.


Leave A Reply Cancel reply

You must be logged in to post a comment.

Dynamics CRM - Google Charts Mashup
Previous Article
How to add an Editable Grid to a Dynamics CRM Form
Next Article