Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

running total

I am having issues creating a running total on the field "Count Charged off loans" with the output the way it is in the green column. (the running total resets when the tier field changes). Ple...
  • parry2k's avatar
    parry2k
    7 years ago

    use this measure 

     

    RT = CALCULATE( SUM( Table1[Count Charged off Loans] ), 
    FILTER( ALLEXCEPT( Table1, Table1[Tier] ), Table1[Loan Life] <= MAX( Table1[Loan Life] ) ))
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous,

    You can also use the following DAX to calculate the measure.

    Expected result = 
        CALCULATE (
            SUM ( Table1[Count Charged off Loans] ),
            FILTER (
                ALL ( Table1 ),
                Table1[Loan Life] <=MAX(Table1[Loan Life])
            ),VALUES(Table1[Tier])
        )



    Regards,
    Lydia