Jump to content
  • 0

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


Caspiosa
 Share

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!

Link to comment
Share on other sites

3 answers to this question

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)

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...