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

Announcements
Nominations are now open for our Partner Ambassador and Luminary programs: Submit yours today!
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Please help me on the issue highlighted

Dear Mr Vineeth,

Below exprsession is something you had written for me when calculation age as the difference between two dates (as at date-TRN Date) that is only when as at date is there as a dimension. But when the as at date is not there as a dimension I sought your opinion as to how I could present it in the script. The answer given by you is by using let statement. But I tried it in the load statement as you mentioned but all the fields were disappeared. May be the place & the way I write it in the script must be  wrong. Appreciate, if you properly laid down this.If you use the bucket you made below using the let statement date as your early reply that would be fine. Also you  mentioned  like below!

let vdate=date#(08/31/2017,'MM/DD/YYYY');

Load $ (vdate) as daties

Please use the above in the below data loading clearly so that I can understand well. Sorry for troubling you. Specially I have no idea where I should write the above on the top of the below data loading, in the middle or at the bottom.

What I need is to be able to calculate the age in the script (08/31/2017-TRN_Date) hereby to be able to create age bucket in the script. You kept guiding me towards this. If possible please show it as a complete data loading so that I will be able to understand better!

DBTORS:

LOAD TRN_DATE,

     AS_AT_DATE,

    (AS_AT_DATE-TRN_DATE) AS AGE,

     if( (AS_AT_DATE-TRN_DATE) > 90 , '>90',

               if( (AS_AT_DATE-TRN_DATE) > 60 , '60-90',         

                      if( (AS_AT_DATE-TRN_DATE) > 30 , '30-60', 

                           if( (AS_AT_DATE-TRN_DATE) > 30 , '30-60',  '0-30' ) ) ) )  as AGE_BUCKET,

     DEBTOR,

     [POLICY NUMBER],

     [AMOUNT O/S]

FROM

[..\AGE(TEST).xlsx]

(ooxml, embedded labels, table is [Sheet1 (2)]);


  •   
  • Reply
Labels (1)
0 Replies