Forum Discussion

VilmarSch's avatar
VilmarSch
Icon for Post Partisan rankPost Partisan
2 years ago
Solved

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 ...
  • DataNinja777's avatar
    2 years ago

    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.