Reputation: 11
I'm trying to compare the metrics of yesterday's data with the previous week same day. To visualize I'm using a line chart. Every time I have to change the comparison date range with respect to the default date range selected.
Is there any way to automate the comparison date range to be the previous week same day with respect to the default range selected?
Upvotes: 0
Views: 10620
Reputation: 11
Trying to work on this, but Im not quite clear on what you want. you can now set a pretty specific time range for the chart ( today -7 , today -1). Then just set the comparison range to the previous period?
here is the setup image:
I think you are asking for something a little different
I did this in a time series , but to do it in a line chart you have to get clever.
First , create your line chart with date as your dimension and put in your metrics. Then you have to create a blend for the data source for the chart. You will use the same data source for the chart and join on "Day of Week Name" .
Here is my setup blend setup:
On the date range for the second source you need to use -14 to -8 from todays date using the advanced settings.
I just just changed the name of the blend source sessions to read previous week. Here is a pic of the graph next to the other one.
There is some funkiness here to deal with , and i think I found a bug. I wanted the days of the week to increase by date, not by the day of the week. You 'should' be able to do that , but when I try the dates come out as yyyymmdd instead of day of the week. Oh well! Hope that helps some.
Upvotes: 1