Do Not Consider If Accumulated Value Is Negative

How to do this calculation in Power BI?

Captura de tela 2024-04-15 221324

Mes Valor1 Valor2 Medida
1 640,57 543,65 96,93
2 1.291,28 456,18 932,02
3 447,82 572,50 807,34
4 503,29 616,34 694,28
5 288,60 535,83 447,06
6 214,16 1.048,19 0,00
7 1.034,12 463,47 570,65
8 467,98 1.370,22 0,00
9 1.646,51 1.998,95 0,00
10 1.008,39 862,96 145,43
11 1.126,45 2.018,41 0,00
12 535,58 815,62 0,00

Can someone help me?

Hi @VilmarSchi ,

Is your problem resolved and what help you require here and for your first question it is possible in power bi.

Thanks,
Anurag

@Anurag hasn’t been resolved yet. The help I need is to achieve in Power BI the same result that is in the “Medida” column of the spreadsheet in the image above.

Hi @VilmarSchi ,

Could explain me how it been calculated for first row.
I have created the pbix with the help of above data.
As as per formula i am getting first column value as 9692

Thanks

@Anurag I did it this way

=IF ( ( B2 - C2 ) < 0; 0; B2 - C2 )

When considering investment options, it’s crucial to steer clear if the accumulated value is negative. Protect your financial health by avoiding investments with a downward trajectory, prioritizing opportunities with growth potential and positive returns.