Forum Discussion
Sarah_
3 years agoFrequent Visitor
Sum a Running Total
Hi, I am trying to get a running 3 year total that then also sums for the quarter. So what I want is something like this - Where I can calculate a running total, and then sum that total on a q...
Thennarasu_R
3 years agoResponsive Resident
Sarah_
Try This measure,
Measure = CALCULATE ([Test1],
FILTER (
ALLSELECTED( 'Calendar_New'),
'Calendar_New'[sortyearmonth]<=MAX('Calendar_New'[sortyearmonth])
&& 'Calendar_New'[FY_Year] = MAX ('Calendar_New'[FY_Year])
)
)
Thanks
Thennarasu
Thanks
Thennarasu
Sarah_
3 years agoFrequent Visitor
Thanks Thennarasu! I tried a modified version - I couldn't figure out how the [sortyearmonth] and [FY_Year] portions of the formula were working so I went with this -
3 Year Running Total =
CALCULATE(SUM(Sheet1[Quantity]),
FILTER(ALLSELECTED(Sheet1[Calendar Date]),
Sheet1[Calendar Date] > MAX(Sheet1[Calendar Date])-1080 &&
Sheet1[Calendar Date] <= MAX(Sheet1[Calendar Date])))
It gives me the same result where I get a monthly running total, but it doesn't sum the values for the quarter.