Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
chandra63
Creator
Creator

variables creation

Hope all Doing well.

 

I am Trying to calculate Avg in straight table with two dates.

 

we have fields:

1.installment_date

2.Installment_Number

3.OD_Details:- OD,Recovered.Non_OD

4.customer

5.Mortgage

 

based on the fields we want calculate Average like below 

1.avg_gap_bet_od_0                 Average gap between two OD instances is 0 months

2.avg_gap_btw_rec_0              Average gap between two recoveries is 0 month

3.avg_gap_btw_rec_7_12      Average gap between two recoveries instances is between 7 and 12 months

4.avg_gap_btw_rec_4_6        Average gap between two recoveries instances is between 4 and 6 months

5.avg_gap_bet_od_rec_1_3   Average gap between OD and its recovery is between 1 and 3 months

Average gap between OD

  • § Arrange all line wise entries of a contract, mortgage id for OD_detail=OD or OD_detail=recovered entries (i.e. only excluding Not OD entries) in ascending order of installment due date
  • § Find out difference between 2 consecutive entries in days
  • § Take average of the days and convert into months

EX:

1-Jun-17    0

1-July-17   30

1-Sep-17    62

1-Dec-17     91

Avg             1.45.75

total_months  1.1.525

How i can Achieve this.please help me on this

please refer the document attached

 

Thanks.:Heart

Chandra

 

 

0 Replies