Create a string months parameter like this from Jan-Dec
Use that parameter to calculate month data
Create calculated field
then create a LOD to calculate last three month data.
If you select month Dec it will show you last 3 months data i.e Oct,Nov and Dec
You can use this calculation to get the idea for your requirement.
If you want the sum of all the three months then drag the months parameter in row shelf and LOD in label.
I hope this might help you.
I already have done this however it won't work if my selected month is January or February, similar to what I have previously done.
Is there any way to capture that in Tableau? Thank you in advance!
May I know also what the calculation is in your Calculations5 Field? Thanks!
I wanted to create something like this.
if I do the rolling countif in Excel. In this case, the month selected is January. Instead of fixing it on the Order Date, it should be fixed on the Counter/Group.
However, I'm stuck on how to do it in Tableau...
My Excel formula looks like this, where I have a rolling counter to group the values based on the Difference. Hope this clarifies further.
Downloaded your file. When I selected January it only shows January. It should also show November and December of last year (2012 an exception).
Is there any other way? Appreciate your help so much, Mahfooj!
Its because we don't have data for year 2009 that's why!
Just removed the Jan & Feb from the month parameter list so that you don't get confused.
However you may follow the below link to get some idea.