To return the total sum of a number array
With the function, you can calculate the mathematical sum of numeric values from an array or a table.
For example, the sum of invoice totals or the sum of a specific item sold across all stores.
In conjunction with the
wherefilter conditions, you can, for example, determine the turnover of a specific item sold in a specific store in a specific year and prepare the result for display or further process.
Result: Sum value of all invoice totals in the Invoice table.
sum((select Invoices where year(Date) = 2021).Total)
Result: Total of all invoiced amounts in 2021.