Summing values into repeatable group (aka "groupingBy")

Hi!

I want to sum all positions and group them by their respective invoice number.

However, I cannot make the computation work.
In the documentation I only found a hint that filer don’t work with “parallel iterations”. Am I doing a parallel iteration here? Is there a solution for this?

My Data Model (A12 2023-06-ext3):
domainModel.json (4.5 KB)

Thanks,
Tobias

PS: This is a simplified example. My real life example is more complex and has additional restrictions on how to model my groups and fields. :wink:

How to do analytic queries on documents? is a very similiar question I think

It seems the $-Operator does the trick. I’ve never come across that before and the documentation is really hard to understand. Is there a online training or do we have some good examples somewhere?

Hi @tobias-amber-boulder
I’m glad you were able to find the correct part of the documentation and a solution for your problem.

There’s a Kernel Language Tutorial available in the Documentation. It starts off slow but by step 3 you are using Filter Operators and the $ Operator (Step 3c). There’s an expandable area after each rule to explain what’s happening in detail.

I hope that helps :slight_smile: