1 Reply Latest reply on Jan 14, 2017 6:27 AM by Ana Yin

    Google Analytics replication -> Overlay dates on top of one another (with Rolling period & YoY parameter)

    Ana Yin

      Hi all,


      I have quite an urgent request....a client is very keen on replicating a google analytics 'dream scenario' using tableau)


      I have a date parameter:

      Rolling period


      these are controlled by a Start Date and End Date Parameter.


      Basically I've configured the analysis such that, for eg. if a user selects a date range (using Start / End date parameter) of current period:13/01/2013 - 20/01/2013 (, and chooses "Rolling Period" on the parameter, then the previous period is equivalent 5/12/2013 - 12/01/2013 (all computed by number of days falling in between the date ranges, using datediff function).


      That's all good, done that, but the next step is to lay those two lines on top of one another on the same axis, and again done that too (refer to tab "Overlay" in the attached .twbx)....but the problem is that the previous period is starting on 6/12/2013 instead of on 5/12/2013 (this is better explained by the excel sheet I've attached). I've explained the 'ideal scenario' vs what is actually happening in tableau at the moment. Please refer to the excel sheet as you're looking in the "Overlay" tab of the .twbx.


      Please don't change the parameters in the Overlay tab as I'm referring to that example to explain the problem. Can somebody help me tweak the formulas so I get the 'ideal' scenario? I'm so close to achieving this that it'd be a shame to scrap the Rolling Period analysis. Don't worry about the YoY as that is working properly. 


      I hope I'm being clear in what needs to be achieved! I'd be forever grateful if somebody helps me solve this!