0

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": {
    ["sum","AMOUNT"],
    "/",
    ["sum","WEIGHT"]
}

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

Thank you!

1
  • 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

0

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.

0

Eric is correct,

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

Thanks

You must log in to answer this question.

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