Historical ruing 30 day window

Hi,
I have a table containing ID and a date, I like to count unique id’s for the last 30 days, I have no problem doing for the current date, but how do I solve it for historical dates, e.g. 2019, the output I like to achive is:

Date, 30DayCount
20190101, 45768
20190102, 45987
.
.
.

The 20190101 contains the number of unique ID for the last 30 days ending and including 20190101

any tips on how to solve this

Hi there @patber,

well you can try Window Loop Start node with window size 30 and step size 1. In each iteration GroupBy node probably can do the job and add a bit of manipulation to have last row (date) value in your only row.

If you encounter any problems or have questions feel free to ask :wink:

Br,
Ivan

Was actually exactly that I tried before posting, but I did not manage to get anything other that count per day, any hints?

Possibly


node can help.

1 Like

Solved it as per ipazin suggestions

1 Like

Hi @patber,

glad you made it!

Br,
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.