Forum Discussion

TheoM's avatar
TheoM
Helper I
7 years ago
Solved

running total in calculated column

Hi all,   My data model contains a table with planned changes in stock per item. I want to add a column to this table which contains the accumulated stock changes for this item until the date of th...
  • AlB's avatar
    AlB
    7 years ago

    TheoM

     

    OK, try this:

     

    RunningTotal =
    CALCULATE (
        SUM ( Table1[Movement] ),
        Table1[Date] <= EARLIER ( Table1[Date] ),
        ALLEXCEPT ( Table, Table1[Item] )
    )

    It's always good to show your sample data also on table/text format so that it can be readily copied