Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation between columns

Dear all,

Could you please help me with the following challenge?

I have the following data (number of clients) in a pivot table in Qlikview:

#`ClientsYear client purchased item:2009201020112012
Year client registered:
From 20092.5371.485894572
5From 201012.1954.0322.184
From 201118.1633.555
From 201210.887

Now I would like to calculate the survival rate:

Survival rateYear client purchased item:2009201020112012
Year client registered:
From 2009100%59%35%23%
5From 2010100%33%18%
From 2011100%20%
From 2012100%

The survival rate is calculated by dividing the number of clients in a particular year by the number of clients in the registration year.

For example: in 2011 there were 894 clients active who registered themselves in 2009. In total 2.537 persons registered themselves in 2009. 894/2.537 = 35%

Anyone any idea? All help is greatly appreciated!!

Best regards,

Dorine

13 Replies
Not applicable
Author

Please replace with your script with attached script and change your expression to below:

=textCount (DISTINCT EMAIL) / textCount (DISTINCT TOTAL <InsertYear> IF(Year=MinYear, EMAIL))

Not applicable
Author

Thank you for you quick response!

I copied your code but it is not working completely. Tomorrow morning I will dive deeper into your code to see what you changed. Hopefully I understand and make it work. I will let you know.

Not applicable
Author

can you please post your sample source data with small data so I can help you more.

Not applicable
Author

Dear Dathu,

Your answer was almost right but instead of MinYear I had to use InsertYear. It works perfectly. Thank you!!!!

Best regards,

Dorine