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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikbuddy
Contributor III
Contributor III

Accumulation is not working in Qliksense pivot table.

i am creating a churn details related pivot table, where i have created couple of expressions and they are fine in the pivot table. i have to create the cumulative churn for that i am using the below expression. i even tried sorting the column but values are coming as 0 or some unexpected values. kindly suggest what to do here.

RangeSum(Before(Count(DISTINCT {<TLD_Flag={1},Churn_Flag={1},Months_Diff_TLD_Start_End={">=-36 <=36"}>} Subscription_Id), Months_Diff_TLD_Start_End), 0, Rowno())

Churn expression :

= if(Count(Distinct {<TLD_Flag = {1},Churn_Flag= {1},Months_Diff_TLD_Start_End = {">=-36 <=36"}>} Subscription_Id)/1000 > 0,

Count(Distinct {<TLD_Flag = {1},Churn_Flag= {1},Months_Diff_TLD_Start_End = {">=-36 <=36"}>} Subscription_Id)/1000)

using this churn expression i have to create accumulation expression but its not working as expected.

I am using Months_Diff_TLD_Start_End as column and its a derived column from the back end script. 

,(EXTRACT(YEAR FROM TLD_Expiry_Date) - EXTRACT(YEAR FROM Disc_Start_Date)) * 12

+ (EXTRACT(MONTH FROM TLD_Expiry_Date) - EXTRACT(MONTH FROM Disc_Start_Date)) AS Months_Diff_TLD_Start_End

2 Replies
Nagaraju_KCS
Specialist III
Specialist III

May be this 

Rangesum(
    Above(
       Count(DISTINCT {<TLD_Flag = {1},Churn_Flag = {1},Months_Diff_TLD_Start_End = {">=-36 <=36"}
       >} Subscription_Id) / 1000,
    0,
RowNo(TOTAL))
)

marcus_sommer

The general approach is ok. but by more complex objects it may need some total-statements and/or even wrapping it with an aggr() maybe like:

rangesum(before(TOTAL MyExpr, 0, rowno(TOTAL)))

aggr(rangesum(before(TOTAL MyExpr, 0, rowno(TOTAL))), Dim1, Dim2)

I suggest to start with a new chart and only a single dimension + MyExpr and the accumulation. If it worked like expected you could add step by step more complexity.