• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Blog
  • Power Platform
    • Power Apps
    • Power Automate
    • Power BI
    • Power Virtual Agents
  • Dynamics 365
  • Azure
  • About Me
Joe Gill Logo

Joe Gill

Microsoft MVP - Power Platform Consultant

Home » Power Platform » Dataverse » How to handle Nulls in Dataverse Calculated Fields

How to handle Nulls in Dataverse Calculated Fields

1st August 2016 by Joe Gill Leave a Comment

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. 

How to handle Nulls in Dataverse Calculated Fields - Joe Gill


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

How to handle Nulls in Dataverse Calculated Fields - Joe Gill

The calculated field that totals the four custom fields.

How to handle Nulls in Dataverse Calculated Fields - Joe Gill

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.

How to handle Nulls in Dataverse Calculated Fields - Joe Gill

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

How to handle Nulls in Dataverse Calculated Fields - Joe Gill

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.

How to handle Nulls in Dataverse Calculated Fields - Joe Gill

Share This On Social:
  • Tweet
  • How to handle Nulls in Dataverse Calculated Fields - Joe Gill

Filed Under: Dataverse, Dynamics 365

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Popular Categories

  • Power Platform
    • Power Apps
    • Power Automate
    • Power Virtual Agents
  • Azure
    • Logic Apps
  • Dynamics 365
  • .NET
  • AI
  • SQL

More to See

Power Platform Requests – Base Request Capacity

17th December 2020 By Joe Gill

Power Automate Desktop

Power Automate Desktop – UI Flow

26th November 2020 By Joe Gill

Synapse Link for Dataverse – Metadata

5th July 2022 By Joe Gill

extract table from pdf and write as csv file using Power Automate Desktop

Extract Tables from a PDF using Power Automate Desktop

23rd May 2022 By Joe Gill

Tweets

Footer

Joe Gill

Microsoft Business Applications MVP – Power Platform, Dynamics 365 and Azure.

An architect with over twenty years experience designing and developing technology solutions. Specializing in the Microsoft technology stack including Power Platform, Dynamics 365 and Azure. Microsoft MVP Profile

Connect on Social

Useful Links

  • Home
  • Blog
  • About Joe Gill
  • Power Platform
  • Dynamics 365
  • Azure

Featured Posts

Power Platform Requests – Base Request Capacity

Power Automate Desktop – UI Flow

Power Fx Formula Columns in Dataverse

Synapse Link for Dataverse – Metadata

Extract Tables from a PDF using Power Automate Desktop

Dataverse Anonymization

© 2022 · Joe Gill