Adding Prior Month and Year Comparisons to Trends

Last update: 2023-03-27
  • Created for:
  • Beginner

Learn how to apply custom date ranges to create monthly and yearly trend Comparisons for any metric in Analysis Workspace.


Hey, this is Eric Matisoff, Global Evangelist for Adobe Analytics.

One of the questions that we get all the time is how can we recreate this same style report where we have data for a specific metric, trended over time for the selected month, four weeks prior, and 52 weeks prior. Now keep in mind that , I’ve currently pulled this up , within reports in analytics, for the Page Views Report, but within analysis workspace, you’ll have the flexibility to apply it to literally, any metric within analysis workspace, that you want to tap into. So let’s work on recreating this exact same report, using the powers of analysis workspace. To start, we dig into a brand new Freeform table. Now since this is a relatively simple table, that we’ll be building, there’s no need to tap into the power of the table builder. But instead, we’re just going to simply drag and drop. So I can drag in Page Views. And I can choose to duplicate this column a couple of times by just simply command, clicking and dragging that metric over to a second and third column. In addition, I need to take advantage of the true power that is, quite honestly, well hidden within our left row, because all the way at the bottom here, and that is the power of date ranges components. And I’ve already actually created to date ranges four weeks prior and 52 weeks prior. So all I need to do is just simply drag and drop those date ranges, and you’ll see that we have everything we need to recreate that same report that we were looking at earlier within Reports and Analytics. Don’t forget you also will want to drag and drop your line graph so you can see it trended over time as well.

Now, the last part to figure out is how did I actually create these two date ranges, it’s very possible that in your implementation, you don’t yet have a four weeks prior and a 52 weeks prior date range that is been custom created. So let’s dig into how I set these up. You can of course, click the plus button here in order to create a new date range, or you have the opportunity to go to components and new date range or take advantage of our keyboard shortcut. But rather than create one from scratch, I’ll just kind of walk you through the steps. So we can click the info button on the one I’ve already created, the pencil in order to edit it. And you’ll get a feel for what that date range looks like, by digging into what I’ve created here which are rolling dates. This is especially important for what you’re building here because when I log into this report tomorrow, I need to know that I’m digging into four weeks prior to tomorrow, rather than four weeks prior to today. And so what I’ve done is I’ve said, you know what I want to say, and focus on the start of the current week minus four weeks, and then end on the start of the current week. That way, I have a nice square block of four weeks worth of data. Feel free to adjust this and play around with it to get a feel for how exactly it works. Another key tip is dig into the fact that we’re presenting you with the selected number of days within the date range builder here as well. So you know that you set it up correctly, if it’s set to 28. Or incorrectly if it’s set to, for example, just one, or 29.

Use rolling dates because they’re super powered.

Similarly, we can dig into 52 weeks prior, which I’m using basically the same concept. I’m tapping into the power of rolling dates. And we can say that I’m starting at the current week minus 52 weeks, and I’m ending at the start of the current week. Again, we’re now digging into 364 days worth of data, which is if my math is correct, 52 times seven. Cancel and cancel. And just like that, we’re able to recreate that same report we saw within Reports and Analytics, but instead, we’re doing it with the power of analysis workspace. Don’t forget, these date ranges will persist for you. So you can imply them anywhere, not just to these columns within this report. Thank you. -

On this page