Forum Discussion

PaulElliott's avatar
PaulElliott
Qrew Member
2 years ago

Sum If Function

I'm about done on my first build using Quickbase, I'm looking for something similar to a sumif function where I can summarize a sequence of number fields on a record where I only want to add up numbers greater than zero.

There is a sum function and I tried the following without any luck.  

sum(if([Change Stucco Price]>0,
[Change Stone Price]>0,
[Change Lap Price]>0,
[Change B&B Price]>0,
[Change Shake Price]>0,
[Change Shutter Price]>0,
[Change Corbel Price]>0,
[Change Soffit Total Price]>0,
[Change Gutter Price]>0,
[Change Plaster Foundation Price]>0,

([Change Stucco Price]+[Change Stone Price]+[Change Lap Price]+[Change B&B Price]+[Change Shake Price]+[Change Shutter Price]+[Change Corbel Price]+[Change Soffit Total Price]+[Change Gutter Price]+[Change Plaster Foundation Price]),
0))

I know that this formula doesn't work, but figured I would put it here to give an idea of what I'm looking to accomplish.

Any help is appreciated.

------------------------------
Paul Elliott
------------------------------

  • try this

    if([Change Stucco Price]>0,[Change Stucco Price],0)

    +

    If([Change Stone Price]>0,[Change Stone Price],0)

    +


    etc for all the rest. 





    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • PaulElliott's avatar
      PaulElliott
      Qrew Member
      Thanks that worked and was much simpler than the path I was taking.  Sometimes I get so deep into the weeds of the problem that I don't do the easiest solution.


      ------------------------------
      Paul Elliott
      ------------------------------