Your 'columns' are members of your date dimension I'm guessing?
You can create a calculated field like this which will pull the two months prior to December 31 2016;
SUM(IF DATETRUNC('month',[Order Date])>= DATETRUNC('month',dateadd('month',-1,#2016-12-31#))
DATETRUNC('month',[Order Date])<= DATETRUNC('month',#2016-12-31#)
Replace #2016-12-31# with the date you want to use (or a parameter) or the NOW() function to anchor it to 'today'.
Hi Tom! Thanks so much for your respons!
the thing is.. it does not work i dont know what im doing worng.. it marks tow error, my tableau is in Spanish so i will try to translate as best as i can.
1) DATETRUNC is being called with (integer), did you mean (string, datetime)??
2) Cannot mix aggregate and non-aggregate comparisons or results if IF expressoins.
I will appriciate it so so so much if you could help me out, i been looking for a way to do this all over the internet and came out empty