Forum Discussion
jerryr125
1 year agoHelper IV
Rolling 12 Column Monthly Calculation
Hi I am looking to do a Rolling 12 calculation in a table. Example Table_ABC: Date Quantity RollingTwelve 1/1/2024 8 2/1/2024 10 3/1/2024 14 4/1/2024 16 ...
- 1 year ago
You could add a calculated column:
RollingTwelve = CALCULATE( SUM(Table_ABC[Quantity]), FILTER( Table_ABC, Table_ABC[Date] <= EARLIER(Table_ABC[Date]) && Table_ABC[Date] > EDATE(EARLIER(Table_ABC[Date]), -12) ) )This will give you a rolling 12 month total for each row, results as follows
wardy912
1 year agoSuper User
You could add a calculated column:
RollingTwelve =
CALCULATE(
SUM(Table_ABC[Quantity]),
FILTER(
Table_ABC,
Table_ABC[Date] <= EARLIER(Table_ABC[Date]) &&
Table_ABC[Date] > EDATE(EARLIER(Table_ABC[Date]), -12)
)
)
This will give you a rolling 12 month total for each row, results as follows