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

Hi @heichitc,
It’s been awhile since we last heard from you; did you have any additional questions or were you able to find a solution from the assistance provided above?\

If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.

Thank you!

Hi @heichitc,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for any relevant information that may be needed.

Thank you!