• 0

Calculate SUM of fields when some of the fields can be NULL

Question

HI!

I want to calculate a sum of several (6) fields using  calculated value field. Almost always there will be fields with NULL value among these 6. How do I create a formula that 1) scan all 6 fields, 2) select only fields with value (or replace NULL value with 0) and 3) sum these fields.

Thanks!

Recommended Posts

• 0

You can use the ISNULL function for each field and set it to zero to have the null fields converted to zero.

Something like this:
ISNULL([@field:number1],0) + ISNULL([@field:number2],0) + ISNULL([@field:number3],0) + ISNULL([@field:number4],0)

Share on other sites

• 0

Hi, @Caspiosa, just to add with Tubby's answer, you may also want to check this link for ISNULL function.

Share on other sites

• 0

Thank you so much! It works like magic!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.