ROLLWIN - How to analyze a lifetime event trigger

  • 30 November 2021
  • 4 replies




I am trying to analyze if an event is triggered by an user during his entire life time inside our app, dividing that number by the total amount of users who performed a specific event at least once.

For example, users who liked a photo at least once since they have installed the app, divided by the total amount of users who performed an event to open a photo - In short, check how many users who are truly interacting with the feature (opening a photo) are giving a like on it.

I heard I can use ROLLWIN for that, my current formula is "UNIQUES(A)/UNIQUES(B)", where A = users who liked a photo at least once, and B = users who opened a photo. I want to measure that, but using events analyzed from the entire lifetime of the user.

How do I do that?






Best answer by MikkoKarvonen 7 December 2021, 07:42

View original

4 replies

Userlevel 6
Badge +8

Hi @nicolas ! Welcome to the Amplitude Community and I’m happy to help! :wave:

By lifetime of the user, it sounds like you want to know the calculation of this formula across the entire time your organization has used Amplitude. If so, then please note that there is a limit to how long a date range can be within charts. The longest is 12 quarters of data for the Event Segmentation. 

You can build a chart like this with bar chart view: to look at the resulting number of the equation number of unique users who played a song or video (liked a photo in your case) sometime in the last 12 quarters divided by the number of unique users who selected a song or video (open a photo in your case) sometime in the last 12 quarters.

Hope this helps! 

Userlevel 5
Badge +3

If I understood your use case correctly, there is no need for ROLLWIN() here.

The approach suggested by @belinda.chiu works. You can also use segments or cohorts, combined with Active % view, to get what you are looking for. This example only looks at the data from the last year, but you can use the same principle to create a cohort or cohorts that allow you look at the longer period of time:

Note that most of the time you don’t really need super long period of time to find your answers. A representative sample tends to get you as good an answer as the whole dataset. In this case, I’d consider focusing on the users who were new during the last year, or something similar:


Hi guys, appreciate a lot the response!

So basically, to trigger the users who “performed” an event at least once since they installed the app, I just need to change that option from Daily to Quarterly (and select 12q)? Will it get a sum of all users who performed that event between his entire lifetime (1 year, let’s say)?

A more precise example: An user installs the app on D0. On D1, he uses event B and not event A. I have a calculus for UNIQUES(A)/UNIQUES(B). Then, the result will be 0/1 (answer is 0). 

On D7, the user triggers event A, then, since D7, the calculus for that specific user will always be 1/1 (A and B were triggered at least once since the user installed the app), even if the user gets into D60, the calculus will always be 1/1 (answer 1) if I get the chart filtered Quarterly?




Userlevel 5
Badge +3

@nicolas : Simple answer: yes.

The only things that the choice between daily-monthly-quarterly affects are:

  • The granularity of displaying the data in the line and stacked graphs.
  • Maximum length of time you can choose for your visualization: 1 year for daily, 3 years for monthly/quarterly.

Since you are using the bar graphs here, they simply sum up the data from the selected time period, regardless of how long it is.