Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
boris_nechaev
Contributor III
Contributor III

Customer retention

Hello QlikView community!

I have a task that I don’t quite know how to approach. Any help would be much appreciated.

I have two tables to work with. First is the customer information with relevant fields being customer ID (customer_id) and account creation date (account_created_date). The second table stores customer sessions, i.e. customer visits to the system. Fields we need here are customer_id and session_date.

The task is to figure out customer retention. Specifically, for each customer I have to calculate number of days in which he/she had a session within first 14/30/60 days after account creation. I know how to then aggregate this information, what I don’t know is how to obtain it.

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Hi Boris,

maybe something like this:

= count( if( session_date >= account_created_date and session_date <= account_created_date+14, session_date))

to count all session dates within the first 14 days (replace 14 by 30/60 to retrieve the other buckets then).

Create a straight table with dimension customer_id, then use above expression(s). Your sessions should already be correctly linked to the customer via customer_id. session_date and account_created_date must also be recognized as Date type by QlikView, please have a look into date format and Date() and Date#() functions for that.

Does this answer your question? I assumed you already loaded the tables into QlikView and the tables are linked together.

Regards,

Stefan

View solution in original post

1 Reply
swuehl
Champion III
Champion III

Hi Boris,

maybe something like this:

= count( if( session_date >= account_created_date and session_date <= account_created_date+14, session_date))

to count all session dates within the first 14 days (replace 14 by 30/60 to retrieve the other buckets then).

Create a straight table with dimension customer_id, then use above expression(s). Your sessions should already be correctly linked to the customer via customer_id. session_date and account_created_date must also be recognized as Date type by QlikView, please have a look into date format and Date() and Date#() functions for that.

Does this answer your question? I assumed you already loaded the tables into QlikView and the tables are linked together.

Regards,

Stefan