Supermetrics Support Forum

Solved

How do I get the current month total sessions one year ago?

I will explain in more details here. 


I want to compare "this month to date" sessions with the total sessions for the same month, one year ago. 


So, I eg can show January 2016 as 100% - and January 2017 to date as X%. In that way, I can follow how I am doing in the current month compared to the same month one year ago.


I would like to do the same thing with "last month" vs. Last month one year ago (total sessions)


Please see the attached file. 


Regards, 


Chrilles

  • Hi Chrilles,

    didn't recognise the data source from your screenshot. But for many data sources, it's possible to choose "Compare to" -value as "Same dates a year ago" like this:


    image


    If you cannot see the "compare to" in your Select dates dropdown, then you have to create two queries side by side with different date ranges (change the year) and do the comparison calculations with formulas in new cells.





    Best regards,

    Jouni Hyötylä

    supermetrics.com


    Twitter: @Supermetrics 

    Support forum: supermetrics/forum

  • Thanks a lot Jouni for your reply. 


    Yes, I can choose Same dates a year ago, but that is not what I want. 


    I want to compare "this month to date" sessions with the total sessions for the same month, one year ago. 


    ... and I would love not to make more than one query. 


    Maybe I just should stick to compare Month to date this year with Month to date Lars year and avoid getting myself into too many issues ;-)


    Regards, 


    Chrilles

  • Hi,


    sorry, I didn't understand your question correctly the first time. For that kind of data you unfortunately have to do two separate queries. If you were thinking about refreshing the data correctly, you can for example use the auto-refresh triggers to get the new data to both at the same time.


    You might want to take a look at info on setting the query date range with text parameters: https://secure.php.net/manual/en/function.strtotime.php



    Best,

    -Jouni / Supermetrics

  • Thanks a lot Jouni


    I did actually see https://secure.php.net/manual/en/function.strtotime.php and think it is great the option is there. However, it is way over of what I am able to understand :-)


    I  have come to the conclusion, that I will compare MTD this year with MTD last year. That makes everything a lot easier. 


    Best, 


    Chrilles

  • No worries Chrilles, glad to help.


    btw. That's the how I would do it also. Fast and efficient. :)



    Best regards,

    -Jouni Hyötylä / Supermetrics

Login to post a comment