Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative Sum, DAX

Hi all,   I'm having trouble creating a calculated column (or measure) in DAX that will return a running total based on groups.  The data I'm working with looks like this:   I need the Re...
  • Anonymous's avatar
    Anonymous
    6 years ago

    This is my ussual way of calculating running totals but it should do the trick for you aswell.

    Calculated column =
    CALCULATE (
        SUM ( 'Table'[Requirement quantity] );
    // Calculate over the entire table ALL ( 'Table' );
    // Filter where item numbers are the same 'Table'[Item Number] = EARLIER ( 'Table'[Item NumberT] );
    // Filter the order for calculating 'Table'[Index] <= EARLIER ( 'Table'[Index] ) )

    Always here to help.

    Kind regards

    Joren Venema