Why I cannot use new Calculated field with "SumOver"/"Sum" function in other calculation?

It shows error when I use the calculated field in calculation with other fields, both of them are numbers. How can I subtract them?

Hi @heichitc,

The general rule is that you can’t mix aggregated values and non-aggregated values in the same calculated field. There’s a section in this article that goes over mismatched aggregation errors.

This second article also covers the topic of mismatched aggregation.

If you can describe what you’re trying to calculate, I can help you come up with the correct calculated field.

1 Like

In this case, there will be no ways to compare the value between them?

Can you try this?

sumOver(quantity, [part_model_name], PRE_AGG) - quantity
1 Like