Dear Community,
I would appreciate if someone could support me with the problem I am struggling with.
I have a table with measures and values of those measures:

Based on that, I need to calculated new measures and I have a mapping table:

New measure column groups the measures from the first table and factor indicates the sign for group by - for example Cal Measure 1 calculation is Measure2 minus Measure1. But then Measure2 is the sum of Measure 3 and previously calculated CalcMeasure1. If I make a simple join, CalcMeasure2 has only 1 component (measure3), as CalcMeasure1 (from Measure column) falls into right ancor of the join. I have some work around - taking measures which all components can be found in the first table, then append them to the first table. After that another join with measures which components are previously calculated and another append. However it is not really sufficient. Is it possible to make some iterative macro for example, which could the CalcMeasure1 (Group 1) calculate, append to the first table, than take the CalcMeasure2, calculate and append to the first table. The loop would end when all CalcMeasures are calculated, it would be around 150 New CalcMeasures.
Thank you in advance,
Javier0705