Please see if the workbook attached in the Forum thread can give some ideas.
First step is to get the difference in months between month in question and previous December:
DATEDIFF('month', DATETRUNC('month',[Order Date]), MAKEDATE(YEAR([Order Date])-1,12,1))
Then lookup value for that previous December [LookupPreviousDec]:
Then the difference is:
This should work if you have data for every month.
There will need to be some modification if some months are missing data.
267850diff.twbx 1.2 MB
Thanks so much for your help!
it works perfectly!
i just would like to ask, in case you know,
im trying to do a graph where i have only the months,
and i can put the year on color and i get this difference month vs last December,
but whit this formula i does not work for some reason.
do you know what i could do?
thanks so much!
ejemplo1.twbx 24.8 KB
I think the calculation is generally working correctly, but
the issue is that in this dataset there is no value for December 2015,
so the 2016 have no value to compare to. If you can include
the December 2015 Sales, I think it will look correct.
If December 2015 is not available, I made an arbitrary fix that
if the year is the very first one, compare to the sales in January
instead of December.
Please see the workbook attached in the Forum thread.
267850diffB.twbx 67.0 KB