"Rolling Period" for "Running Total"

e.g. in BigQuery,

select
  date,
  cnt_booking,
  sum(cnt_booking) over (order by unix_date(date) range between 06 preceding and current row) as cnt_booking_last_07_days,
  sum(cnt_booking) over (order by unix_date(date) range between 27 preceding and current row) as cnt_booking_last_28_days,
from (
  select
    date,
    count(1) as cnt_booking,
  from
    booking
  group by
    date
)
order by
  date

Our team usually tracking metrics in rolling period (7 days, 28 days),
To neutralize effects of seasonality.

So it would be great, if we can set rolling period in running total.

Hi @Hyun,

Thank you for the suggestion. For now we don’t support rolling period yet but I do believe this option will be useful for a lot of users who’re using our running total feature. I will let you know when there is an update.

1 Like

I will let you know when there is an update.

thanks.

1 Like