Forum Discussion

baravo's avatar
baravo
Icon for Helper I rankHelper I
5 years ago
Solved

How to sum diffently positioned rows in various columns?

Hi,  I need to calculate a column with the closing balance of each day. The closing balance becomes the opening balance for the next day.   Opening balance + Variables_SUM = Closing balance   In ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi baravo ,

     

    Based on your description, you can create a calculated column as follows.

    Cash flow calculation =
    MAX ( 'Test'[Opening balance 1st day] )
        + SUMX (
            FILTER ( ALL ( 'Test' ), [Date] <= EARLIER ( Test[Date] ) ),
            [Variables_SUM]
        )
    

    Result:

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.