Forum Discussion
Do Not Consider If Accumulated Value Is Negative
How to do this calculation in Power BI?
Mes Valor1 Valor2
1 640,57 543,65
2 1.291,28 456,18
3 447,82 572,50
4 503,29 616,34
5 288,60 535,83
6 214,16 1.048,19
7 1.034,12 463,47
8 467,98 1.370,22
9 1.646,51 1.998,95
10 1.008,39 862,96
11 1.126,45 2.018,41
12 535,58 815,62
Hi VilmarSch
This is an interesting topic. This kind of calculation referencing previous rows seems easier in Excel than in Power Pivot, but I am sure that there are many ways to achive this this in Power Pivot/ Power BI, too. For example, you can create helper columns in calculated columns to get the result you want.
I am sure that there are more elegant ways to achive your required output in one calculated column instead of the 3 columns approach above, but your required output is achived in this manner, too.
2 Replies
- DataNinja777
Super User
Hi VilmarSch
This is an interesting topic. This kind of calculation referencing previous rows seems easier in Excel than in Power Pivot, but I am sure that there are many ways to achive this this in Power Pivot/ Power BI, too. For example, you can create helper columns in calculated columns to get the result you want.
I am sure that there are more elegant ways to achive your required output in one calculated column instead of the 3 columns approach above, but your required output is achived in this manner, too.
- VilmarSch
Post Partisan
DataNinja777 thank you for your help