Forum Discussion
Recursive Measure PowerBI
While recursion is elegant from a coding point of view there are usually also non-recursive solutions for most problems.
I'm not sure if I understand your issue correctly, but it looks to me like you are trying to calculate stock on hand based on looking at the Incoming (Entrées) and Outgoing (Sortes) stock. If this is the case and your period is based off a Date column in your model you could do this by calculating a lifetime to date for Incoming and Outgoing and subtract one from the other.
eg
Stock =
VAR _prevEntrées = SUMX( Filter('table1'[DateColumn], 'table1'[DateColumn] <= MAX('table1'[DateColumn]), [Entrées] )
VAR _prevSorties = SUMX( Filter('table1'[DateColumn], 'table1'[DateColumn] <= MAX('table1'[DateColumn]), [Sorties] )
RETURN _prevEntrées - _prevSorties
Hi,
My measure Forecast2 is good pour January 2019 but not good results for others month.
The measure "Sorties2" included several measures and What If Paramater (Tx de controle).
The result for the Measures "Sorties2" is good .
If i add "-Sorties2" in formula "Forecast2", the result is bad.
Why ?
Thanks for your help.
Pierre