Skip to main content

Looking for help to figure out how to do something that should be relatively simple. 

I have an invoice (in Invoice Ninja) with several line items. Each line item has a quantity value. In Zapier I want to be able to add up these quantities to get the total quantity of items. Just one number.

As I understand it, the ‘spreadsheet-style-formula’ transformation is supposed to handle this kind of line-item calculation. 

I’m using the formula “=sum(2. Line Items Quantity:1,2,3,4,0))” to try add each quantity together. The output should be one number (10). I’ve also tried removing the = sign before sum.

I’m getting the error: “

Failed to create a number transform in Formatter by Zapier

The app returned "Invalid Formula: sum requires at least 2 arguments".”

I’ve tried many different things including removing commas and changing syntax without success. 

Any ideas? I don’t want to have to move the line items to an interim spreadsheet to do this.

Thanks.

 

Hi @clearspark 

Good question.

Try using this Zap action: Formatter > Numbers > Perform Math Operation

 


The math operation function didn’t work either.

For anyone looking for an answer on this, by using the transform ‘line item to text’, I was able to then use the array in the sum operation.


Thanks for coming back to update us in this thread, @clearspark! I’m sure others will benefit from this as well so I will go ahead and mark your response as a “Best Answer”. 🙂


The math operation function didn’t work either.

For anyone looking for an answer on this, by using the transform ‘line item to text’, I was able to then use the array in the sum operation.

I am facing the same issue. I tried with both the maths operation function “ADD” and the spreadsheet formula “SUM”. Should be straight forward.  

I see you mention the transform -  “line item to text”. However it doesn’t seem to be available though? I only have the following options: 

 

 


@EvanLuff , you need to change “App&Event” to “Utilities”, then you find the option in “Action”