Forum Discussion

PHanus3's avatar
PHanus3
New Member
4 years ago
Solved

Running Total for values calculated by measure

I would like to ask you how to solve running total for values calculated by measure (Searching already couple of days for solution and can not find anything).  Can you please help me someone? Thanks ...
  • OwenAuger's avatar
    4 years ago

    hI PHanus3 

    To sum the cumulative values of [Total] for each year, you could use a measure like this (change table/column names as needed):

    Running Total = 
    CALCULATE (
        SUMX (
            VALUES ( YearOfProject[Year of Project] ),
            [Total]
        ),
        YearOfProject[Year of Project]
            <= MAX ( YearOfProject[Year of Project] )
    )

    In your particular example, since the underlying measures form a geometric sequence, you could also consider using the formula for the sum of a geometric sequence which would avoid iteration.

     

    Regards,

    Owen