-
1. Re: How to show rolling 6 months graph in Tableau
keerthana kumar Jan 8, 2017 9:10 PM (in response to Rahul Nambiar)Use the Calculated Month Field
if DATEDIFF('month',[Order Date],TODAY())<=5 and DATEDIFF('month',[Order Date],TODAY())>=0 then [Order Date] END
instead of your actual Date field. Replace [Order Date] in the formula with your actual Date column
-
2. Re: How to show rolling 6 months graph in Tableau
Nikunj Bhardava Jan 8, 2017 11:10 PM (in response to Rahul Nambiar)Hi Rahul,
Do you have Reporting Month (Month - Year) as drop down selection? If yes, is it parameter or filter?
Thanks,
Nikunj
-
3. Re: How to show rolling 6 months graph in Tableau
Amrita Karwadkar Jan 9, 2017 3:08 AM (in response to Rahul Nambiar)2 of 2 people found this helpful -
4. Re: How to show rolling 6 months graph in Tableau
bill.merlavage Jan 9, 2017 6:15 AM (in response to Rahul Nambiar)1 of 1 people found this helpfulI use this for my Rolling 6 Month logic:
DATETRUNC('month', DATEADD('month',-6, TODAY())) <= [Order Date] AND [Order Date] <= TODAY()
I add to my filter shelf & return only True.
-
5. Re: How to show rolling 6 months graph in Tableau
Jonathan DrummeyJan 9, 2017 10:14 AM (in response to Rahul Nambiar)
Hi Rahul,
I'm interpreting your question that you want to show multiple months and not a single moving average number. If you want a single number then one of the other solutions posted here will work.
We can get a rolling or moving average from a view with Month as a dimension and a measure (like SUM(Sales) here) in a few clicks.
1) I right-clicked on SUM(Sales) and chose Quick Table Calculation->Moving Average.
2) I right-clicked again on the SUM(Sales) pill and choose Edit Table Calculation to bring up the Table Calculation window.
3) I edited it to include the previous 5 values:
Here's the view:
If you want to filter for certain months then you need to make sure the filter is applied *after* the table calculation is computed, the easiest way to do that is to use a calculated field that is a table calc such as LOOKUP(DATETRUNC('month',MIN([Order Date])),0) and then put that on the Filters Shelf.
v10.0 workbook is attached, let me know if you have any questions!
Jonathan
-
moving avg of sales.twbx 1.5 MB
-
-
6. Re: How to show rolling 6 months graph in Tableau
Rahul Nambiar Jan 12, 2017 7:10 PM (in response to Nikunj Bhardava)Hey Nikunj
Right now in this worksheet I have not kept any filter or parameter Drop down.
Thanks,
Rahul.