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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
chandra63
Creator
Creator

Average Calculation in Expression

Hi Community,

As a very new user of QlikView i need some help about the case below :

we have requirement to calculate Average in expression.

we have Fields.

1.Installment Date

2.Installment Number

3.Customer.

4.Mortgage_ID

5.OD_Details:- OD,Recovered and NON_OD

we want to calculate in straight table expression as Avg like below.

  • avg_gap_bet_od_0

Average gap between two OD instances is 0 months

  • avg_gap_btw_rec_0

Average gap between two recoveries is 0 month

  • avg_gap_btw_rec_7_12

Average gap between two recoveries instances is between 7 and 12 months

  • avg_gap_btw_rec_4_6

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

  • 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

1-Jun-17

0

1-Jul-17

30

1-Sep-17

62

1-Dec-17

91

Average

  1. 45.75

Months

  1. 1.525

Thanks in Advance.

Chandra

1 Reply