Forum Discussion

Iamnvt's avatar
Iamnvt
Icon for Continued Contributor rankContinued Contributor
8 years ago
Solved

Running total without date,rank

hi,   How can I write a measure to get the running total for this below case? I know how to write for a calculated column, just wondering how it will be with a measure.   Thanks   Column1 C...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi Iamnvt

     

    Here you go.

     

    RunningTotal Measure = CALCULATE(
    SUM( MovingSum[Column2]),
    FILTER(  ALL(MovingSum) ,
    SUMX( FILTER( MovingSum, EARLIER( MovingSum[Column1] ) = MovingSum[Column1] && EARLIER(MovingSum[Index]) <= MovingSum[Index] ), MovingSum[Column2] )
    )
    )

     

    This assumes you have created an index column using query editor.

     

    If this works for you please accept this as a solution and also give KUDOS.

     

    Cheers

     

    CheenuSing