Skip to main content

When would you use this?

  • You want to know how many customers bought today, this week, and this month - and whether that number is growing.
  • Your marketing team runs a loyalty campaign and wants to track weekly engagement lift over the following month.
  • Leadership asks “Are our regulars becoming more or less frequent?” - you need a stickiness ratio to answer that.
  • You are building a retention dashboard and need each data point to show the active user count for its own period, not a snapshot of today.

What this recipe builds

Four metrics - DAU, WAU, MAU, and a WAU/MAU stickiness ratio. Each metric uses TIME_METRIC with a different grain, so each date on the time spine shows the active customer count for its own window: a daily count for DAU, a rolling week for WAU, a rolling month for MAU. The stickiness ratio divides WAU by MAU - a high value means customers are ordering frequently, not just once a month. All four metrics are sliceable by city, truck, menu type, or any other dimension.
This recipe uses the time metrics concept. See the documentation for the full technical reference.

Prerequisites

A date entity must be marked as a time spine.
TIME_METRIC handles the join to the time spine automatically.

Steps

1

Daily Active Users

Distinct customers per day. Each date point on the time spine shows the count for that specific day only.
2

Weekly Active Users

Distinct customers per calendar week. Constant within Mon–Sun, then updates at the week boundary.
3

Monthly Active Users

Distinct customers per calendar month. Stays constant for the whole month - the denominator for the stickiness ratio.
4

WAU to MAU ratio

What fraction of monthly customers also ordered this week? High values indicate frequent visitors; low values indicate mostly one-time monthly buyers.
DIV0 is Snowflake-native syntax. For other warehouses, replace with NULLIF - for example, order_header.wau / NULLIF(order_header.mau, 0).

Sample output

First week of June 2022: On June 6, a new calendar week starts - WAU jumps from 97,559 to 100,468 and the stickiness ratio updates accordingly.

Key design notes