Problem with a formula- How to get the total sum of multiple Formula-Numeric fields

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a series of fields where I use a formula, very much like this one:

If([Initial Elbow Reps > 3 per min. / Static Hold > 2 min.]=true,1)


This formula works, but what I'd like to do is have final "Total" field, where I total all of these previous fields.  However, the most logical formula that I set up:

Sum([field 1]+[field 2]+[field 3]...)  only totals when ALL formula fields have been entered.  For example, I have 10 formula fields, but unless all 10 are entered, the "Total" field formula doesn't work and the "total" field remains empty.

I know I'm missing something but can't wrap my mind as to what it could be.  Any help would be appreciated!
Photo of DIGInSiteHealth

DIGInSiteHealth

  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Try this:

Sum(Nz([field 1]) + Nz([field 2]) + Nz([field 3]) )


See the docs for Nz():

https://login.quickbase.com/db/6ewwzuuj?a=dr&r=p
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Or edit each component fields  to check the box called "treat blanks as zero"
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Or use ToNumber():

ToNumber([Initial Elbow Reps > 3 per min. / Static Hold > 2 min.]) +
ToNumber([Initial Leg Reps > 3 per min. / Static Hold > 2 min.]) +
ToNumber([Initial Arm Reps > 3 per min. / Static Hold > 2 min.])