Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I made a heatmap of user retention per day. In the heatmap below, the values on each of the tile is the number of users that were active X days (dimension on top) following the creation of their account (dimension on the left).
Instead of the actual number, I would like a percentage. The proportion of the users that were created on a specific day, that are still active X days following that day.
It seems simple but I've tried couple of things and it just does not work.
That doesn't really change the solution, though, if I understand the data structure correctly (each user ID will repeat twice - once at 0 days and once at e.g. 7 days?)
count({<userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
/
count(total <userCreationDate> {<userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
should be the formula, I believe. Without access to the data and since this kind of an unusual data structure, I can't actually test it.
For the second part of the formula, you might also be able to use:
count( {<nbDaysSinceCreation = {0}, userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
Hard to say without seeing the data structure and the formulas used, but if the formula used is something like count(Users), then the percentage should be count(Users) / Count(total <Date> Users)
Thanks for your answer. I've already tried and unfortunately it divides by the total number of users. What I want instead is that, if we look at the screenshot above, 10 users were active 7 days after the 23/10/2021 (date of account creation). Since 200 users were created on that day (left most cell), percentage should be 10/200 = 5% on that cell.
Formulas are:
Dimension A: userCreationDate
Dimension B: nbDaysSinceCreation
Measure: count({<userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
That doesn't really change the solution, though, if I understand the data structure correctly (each user ID will repeat twice - once at 0 days and once at e.g. 7 days?)
count({<userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
/
count(total <userCreationDate> {<userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
should be the formula, I believe. Without access to the data and since this kind of an unusual data structure, I can't actually test it.
For the second part of the formula, you might also be able to use:
count( {<nbDaysSinceCreation = {0}, userCreationDate= {"$(='>='&Date(Today()-30))"}>} DISTINCT userId)
This worked! Thank you Or, you are amazing! 🙂