Compare today up to an hour vs 7 days ago up to the same hour

Looking for a way to do this:

  1. Control with date and time
  2. KPI visual that shows the revenue difference between today, up to the hour selected in the control field VS revenue for the same timeframe a week ago. E.g. Wednesday up to 1pm vs Wednesday last week up to 1pm.

I found a way to do this with periodOverPeriodDifference and sumIf (by hour), but I bet it’s a hard way and it also doesn’t allow me to use a nice KPI visual.

With another attempt, I was able to achieve this with wto sumIf conditions and two filters on top. The conditions specify the hours I need as well as the days of the week. A filter is needed to simply remove null values and to limit the data to “relative last 8 days”. Everything is tied to the date that is selected as a control. As a result, I have two revenue values for two days that work well with the KPI visual.

Still pretty sure there is an easier way.

1 Like

Thank you for sharing your solution with us @tjk.