Skip to main content
Solved

Can I offset 'Compare to past'?


Forum|alt.badge.img

Hey Amplitude community,

 

I hope one of you have a solution to my issue here :D 

 

Question

‘Compare to past’ lets me compare to the same n days to the previous year. This comparison is date by date.

As weekdays change each year, is it possible to offset this comparison, so I compare monday - friday with monday - friday previous year?

 

Context

I’m trying to make a performance dashboard, where I’ll compare sales performance with previous year. We want to compare weekdays instead of precise dates, as that is a better explaining factor for fluctuations.

 

Solutions I’ve tried so far

2 charts: current performance vs last year performance

  1. Current performance chart: daily view of last 7 days (May 12 - May 19)
  2. Last year performance chart: daily view of last 7 days, offset by 364 days

Issues

  • I can’t present performance in the same chart
  • Offset needs to be changed on leap year (I think)

 

‘Comparing to date range ending’ on custom date

  • Current date range: last 7 days (May 12 - May 19)
  • ‘Comparing to date range ending May 20’

Issues

  • I doubt custom end date moves as days go by. Only useable for the specific week (May 12 - May 19)

Optimal outcome

1 chart where I see 7 days compared to previous year, comparing the same weekdays.

Best answer by eddie.gaona

Hello @andreas_heden!

To my understanding, you want to plot M-F to the same M-F from the previous year regardless of dates changing. For example, March 8 can be a Friday one year and the next year a Saturday. 

There is no out-of-the-box way to accomplish this dynamically. I can see how offset in the “compare to past” feature would help in this case and I can submit that as a feature request.

As you have already discovered using the “custom end date” would at this time be the best approach to get what you are looking for.

View original
Did this topic help you find an answer to your question?

3 replies

MikkoKarvonen
Peer Moderator
Forum|alt.badge.img+3
andreas_heden wrote:

 

  • I doubt custom end date moves as days go by. Only useable for the specific week (May 12 - May 19)

I’m 91,2% sure the custom end date moves forward as the days go by, so essentially it allows you to set the comparison period as you like. I’d at least give it a go.

I’m not sure how it interacts with leap years, though.


eddie.gaona
Team Member
Forum|alt.badge.img+9
  • Amplitude Support
  • 161 replies
  • Answer
  • May 20, 2021

Hello @andreas_heden!

To my understanding, you want to plot M-F to the same M-F from the previous year regardless of dates changing. For example, March 8 can be a Friday one year and the next year a Saturday. 

There is no out-of-the-box way to accomplish this dynamically. I can see how offset in the “compare to past” feature would help in this case and I can submit that as a feature request.

As you have already discovered using the “custom end date” would at this time be the best approach to get what you are looking for.


Forum|alt.badge.img
  • Author
  • Conversationalist
  • 5 replies
  • May 26, 2021
MikkoKarvonen wrote:

 

I’m 91,2% sure the custom end date moves forward as the days go by, so essentially it allows you to set the comparison period as you like. I’d at least give it a go.

You’re right. The custom end date seems to be rolling (which essentially clears my problem).

 

@eddie.gaona it seems “custom end date” is the dynamic solution I’m looking for, so no need for submitting a feature request. Maybe add a description to “custom end date” so users know it’s a rolling date.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings