Forum Discussion

simonGIS's avatar
simonGIS
Helper I
3 years ago

Running Total not working

I have Table1 with two fields.

Need to create a running total for a line chart, covering several years.


Following some tutorials, if I create a Quick Measure on the amount:

 

But this gives me the wrong result:

amount running total in Close Date =
CALCULATE(
    SUM('Table1'[amount]),
    FILTER(
        ALLSELECTED('Table1'[Close Date]),
        ISONORAFTER('Table1'[Close Date], MAX('Table1'[Close Date]), DESC)
    )
)



Have tried a few combinations, but not quite as easy as I was hoping.

 

amount running total in Month =
CALCULATE(
SUM('Table1'[amount]),
FILTER(
CALCULATETABLE(
SUMMARIZE(
'Table1',
'Table1'[Close Date].[MonthNo],
'Table1'[Close Date].[Month]
),
ALLSELECTED('Table1')
),
ISONORAFTER(
'Table1'[Close Date].[MonthNo], MAX('Table1'[Close Date].[MonthNo]), DESC,
'Table1'[Close Date].[Month], MAX('Table1'[Close Date].[Month]), DESC
)
)
)

 

 

 

 



I am sure I am missing something simple?  Can someone help point out where I am going wrong?

 

2 Replies