1 Reply Latest reply on Dec 13, 2012 10:32 AM by Mark Holtz

# T12? TTM? Trailing12? SUMIFS? Looking to chart monthly T12 sales

I have a large data set when I need to create a line chart showing the trailing-12 sales by month. So the value for 11/12 would be the sum of the values from 12/11 to 11/12 and the vale for 12/12 would be the sum of the values from 1/12 to 12/12, and so on.

Here is the solution in Excel:

=SUMIFS([Sales],[Calendar_Month_Date],"<="&[@[Calendar_Month_Date]],[Calendar_Month_Date],">"&DATE(YEAR([@[Calendar_Month_Date]])-1,MONTH([@[Calendar_Month_Date]]),DAY([@[Calendar_Month_Date]])))

• ###### 1. Re: T12? TTM? Trailing12? SUMIFS? Looking to chart monthly T12 sales

Hi Eric

I believe you can do this manually in Tableau by creating a calculated field using the (WINDOW_SUM(SUM()) function, or you can just use a quick calculation to calculate a moving sum for the last 12 intervals (and exclude the current), assuming the data on your view is displayed at a month aggregation.

If you need more assistance, please post a packaged workbook.

1 of 1 people found this helpful