Can Empty Rows Be Ignored When Sum Is Used?

This is a great post. I was achieving the same result on the server side with a simple repeat and a variable creation.

1 Like

That could be even nicer solution - as the calculations are made server-side (not when loading the data in the browser). Probably a better solution for larger data sets.

1 Like

This is the rough draft of the report:

1 Like

Just for the records attaching a screenshot of calculating sums on the server.
This specific screenshot is from an ecommerce site.

The logic is.
(1) Create a query to get the data you need
(2) Create a repeat that runs through query (1)
(3) Inside the repeat set a value that makes a calculation for each individual row
(4) Outside the repeat set another value that sums the result of each individual value

The value created in step (4) holds the total amount that you need.

It can also be created a bit different but the logic is the same.

Thank you!

4 Likes

I like the elegance of that solution.
Off topic : Any way to use the same logic to concat string results instead of a sum ?