Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
sarafamiglietti
Creator
Creator

Churn Calculation in crosstab

Hello,

I have a table with : Week, delay, subs, unsubs.

I want to calculate the churn (unsubs/subs) by week and delay.

If I use "sum(unsubs)/sum(subs)", the formula works when the table is collapsed.

churn_calculation2.JPG

But If I expend the table, the formula no longer works because subs take place on delay 0 and unsubs may occur in other delay.

churn_calculation3.JPG

So I use this formula:

if(Dimensionality()=0 or IsNull(rowno()) or rowno()=0 or (Dimensionality()=1 and rowno()>0)

,sum(Desabo)/sum(Abo)

,sum(Desabo)/rangesum(above(sum(Abo),0,rowno()))

)

But I'd like to find a formula which don't need to use the condition "if(Dimensionality()=0 or IsNull(rowno()) or rowno()=0 or (Dimensionality()=1 and rowno()>0)".

Is there another way to do this?

Please find attached the app.

Thanks for your help.

Sara

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum(Desabo)/Sum(TOTAL <Week>Abo)

View solution in original post

1 Reply
sunny_talwar

May be this:

Sum(Desabo)/Sum(TOTAL <Week>Abo)