Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a source table that contains player activity details with the following columns:
Date, PlayerID, and GameID.
I’m trying to analyze player retention — specifically, I want to identify how many players who started playing on a given date have continued playing in subsequent months.
My goal is to generate an output table in Qlik with the following structure, where each row represents the cohort of players who started on that date, and each column shows how many of them remained active in the following months:
| Retention Month | ||||||||
| DATE | 01/01/2025 | 02/01/2025 | 03/01/2025 | 04/01/2025 | 05/01/2025 | 06/01/2025 | 07/01/2025 | 08/01/2025 |
| 01/01/2025 | 100 | 96 | 95 | 94 | 93 | 92 | 91 | 80 |
| 02/01/2025 | 101 | 97 | 96 | 95 | 94 | 93 | 92 | 81 |
| 03/01/2025 | 102 | 98 | 97 | 96 | 95 | 94 | 93 | 82 |
| 04/01/2025 | 103 | 99 | 98 | 97 | 96 | 95 | 94 | 83 |
| 05/01/2025 | 104 | 100 | 99 | 98 | 97 | 96 | 95 | 84 |
| 06/01/2025 | 105 | 101 | 100 | 99 | 98 | 97 | 96 | 85 |
| 07/01/2025 | 106 | 102 | 101 | 100 | 99 | 98 | 97 | 86 |
| 08/01/2025 | 107 | 103 | 102 | 101 | 100 | 99 | 98 | 87 |
Thanks in Advance,
Regards,
Poojashri
I doubt that there are sensible solutions within the UI respectively I suggest to do the essential work within the data-model. This may include to load the data (n times) within an appropriate sorted resident-load to check the previous records and creating (n) flag/counter-fields with interrecord-functions like previous() and peek() - maybe like:
load
PlayerID, Date,
if(PlayerID = previous(PlayerID),
if(Date = addmonths(previous(Date), -1), x, y), z) as Flag
...
to create 1 to n and/or 0/1 flags and/or continuous (overall and/or this run) counter and/or period-offsets and/or to flag the first/last occurrence (might be also added with aggregation-loads against min/max Date) and/or ...
The table has millions of record and for each date n number of players.
I did it in a different approach but i am having some issue on the front end now.
I can show both measure against 1 single month column.
I'm not sure how to approach to this challenge - creating a pivot-crosstable against two period-fields. The simplest one would be just to double the existing date-field and to look if there are possibilities to add the wanted counting against them.
For this and maybe other trial & error approaches I would create a dummy-app with a small data-extract of maybe 3 dozens records and without much further logic to test different ways - at first displaying the periods and then getting any valiable expression-results.