How to calculate rolling 30 days distinct user count?


image

I have 2 questions:

  1. is the User Count 7-Day Avg actually “total distinct user count for last 7 days”
    here’s the formula calculated field:
    image
    The formula contains the word windowAvg, but it’s always a lot higher than distinct total user count per each day - so it can’t be the average?

  2. how to calculate distinct user count for rolling 30 days? (and plot it on the same chart). I have tried various functions, but no luck. Not much documentation or examples.

Many Thanks

1 Like

Hi @Eleri - There currently is no function for windowDistinctCount which is what I think you need. I think you are going to have to do this in SQL for now. Maybe you can try something like this? sql - Query for count of distinct values in a rolling date range - Stack Overflow

Hi, @Eleri. Let us know if Jesse’s workaround helped. We hope it did!

Would love to know if someone has found a solution to this.

1 Like