for the step clause "measures" using the saql compact form, is possible to make arithmetical calculation like sum(AMOUNT)/sum(WEIGHT) without a compare table? The following example explain what i mean:

"measures": {

I know that this example is totally wrong, but it deserve me to explain more in details my questions.

Thank you!

  • I forget to specify that the result of the calculation will be the grouping clause
    – stod
    Nov 14, 2016 at 10:13

2 Answers 2


This is not possible with SOQL directly.

What you can do is add a formula field to make the calculation, however I do not believe it can be grouped so after that use a WFR to populate a number field with the value from the formula field. Then you can use that in the grouping.

Sometimes the simplest things require many steps.


Eric is correct,

Calculations must currently be done in SAQL or in a compare table, which has a different syntax


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .