I am looking to create a table, with product category as the dimension, that will include a column for the sum of all sales of each product in the previous year only including months up to the latest calendar month in the data for this year. So if the most recent date in the entire dataset is July 2016, then the column would sum sales for each product from January through to July 2015.
My data looks like this:
Posting Date
Category
Total Value
04/01/2015
Storage
730
11/01/2016
Training
235
...
...
...
And my LOAD script like:
Spend:
LOAD
Month(Date([Posting Date])) as [Posting Month],
Year(Date([Posting Date])) as [Posting Year],
[Total Value],
Category
FROM <filepath...>
I attach a data set that contains these data fields.