Best practice to set up data to aggregate over rolling 1d, 7d, and 28d time periods

nzs
Bronze 1
Bronze 1

Hi all! I have a table with a set of user_ids and various activities/boolean values for them. We want to be able to see their values over different rolling time periods from the date_id (i.e. is_active_1d, is_active_7d, is_active_28d). What's the best practice to set up our data for this/is there any good way to do this in the Looker end instead of in the source table?

Currently our tables are set up with columns like:
- date_id
- user
- is_active_1d
- is_active_7d
- is_active_28d

and we've also used sketches to count distinct instead of storing user ID directly, but our tables get pretty ugly when there's a bunch of different metrics that we want over all three time periods. Is there any better way to set them up for usage in Looker or is this the best practice?

0 0 567
0 REPLIES 0
Top Labels in this Space
Top Solution Authors