Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Recursive calculation with cumulated sums

Hello all,

I am struggling in Power Bi to compute the following formula (remain to engage)


RTE(m) = MAX [ sum[TSP] (m0 to m) - sum[AEFP] (m0 to m) -sum[RTE] (m0 to m-1) ; 0]

see example below

 

would you have any idea to solve this please ?

thank you for your support

regards

gen

 

MonthTotal Spend planned 
(TSP)
Already engaged for payment (AEFP)Remain to engage (RTE)
120018020
21008020
315030120
41001090
52005195
650 50
    
total800305495

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      actually my example was a little bit easy... it happens that the planned revised is below the already engaged..
      in this case I need the max to avoid further engagement and make sure that month after month my cumul is valid