Group data (4 layered tables)

hi there. I have 4 tables that are linked to each other in the following way:

I want to group the amounts in table 4, on the elements in Table 1.
How do I do this? I tried some things but it takes an enormous amount of time. Table 4 has around 6,000 rows, group in Table that has around 10 lines.

I have no idea what this graph is showing. Can you describe your actual use case and we might be able to help.

Sorry I thought this question was clear.
I will try to make it more clear.
I have a table (table 4 above) that holds transactions data, including transaction amount. This needs to be summed. Also this table holds a GL Account reference to a GL account table (table 3 above). This GL Account table holds a reference to a table containing a sub-group (table 2 above). This sub group table holds a reference to a table with main groups (table 1). I want to be able to sum the transaction amount based on the items in the main group.

I tried this with a statement like this:
afbeelding

This filter the transaction amount all the way up to the highest level, but no data is shown, it looks like it’s loading for a long time. Is there any other way to do this?

Table 1 doesn’t seem to actually be a table and Table 4 should have a Niv1 column so you can accomplish your grouping without having to take out a 2nd mortgage for WU consumption.

Or you can have Table1 sum increment every time a new record in Table4 is created (not great)

Thanks for the suggestion. I tried this and it improves loading time!