Last 14 days user population

vsil
New Member

Hello, I have a dimension called activity_day which is just a column of daily dates from 2020-01-01 to 2021-12-31, etc. I also have a measure active_users that counts unique active users on that activity day (count_distinct).

How can I calculate unique users in the last 14 days for each activity day including that activity day? Preferably with another measure but a table calculation would also work. Something like this:

activity_day active_users users_active_last_14d
2020-12-31 100 210
2020-12-30 159 170
... ... ...
2020-12-18 99 110

So in the first row, I would have unique active users that were active between 2021-12-18 and 2021-12-31 (210). In the second row I would have unique active users that were active between 2021-12-17 and 2021-12-30 (170) and so on.

Thanks!

0 3 636
3 REPLIES 3
Top Labels in this Space
Top Solution Authors