Get User Retention with Timelion

Hi,
I'm trying to visualize the user retention using Timelion.
In order to do calculate the retention, I have to get today's register user count and next day's " registered only 1 day" user count.
So far, I managed to get this 2 sheet separately.
But I can't figure out how to hold the number of next day's data and use it into this day's expression.
Is there any way I can do this? To cross 2 day data?

This is the expression i came out so far.
.es(q=' event : "login" AND param1 : 1 ', metric=cardinality:Id.keyword).label(register 1 day) , .es(q=' event:"register" ').label(register)

i think what you are looking for is the offset setting:

.es(q=' event : "login" AND param1 : 1 ', metric=cardinality:Id.keyword, offset=+1d).label(register 1 day), .es(q=' event:"register" ').label(register)

you could then also substract one from another, for example:

.subtract(.es(*), .es(*, offset=+1d))

Yes! I just started to learn Timelion yesterday but I can't believe i forgot this.
Thank you so much.

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