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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanu_today
Creator
Creator

Script-Logic

Hi Everyone,

I have wrote all the logics in set analysis level in front end level.But for further process we have to do the calculations in script itself mandatorly

Logics:

I have to show the fields when the below conditions are matched and here attached the sample data.

accountopeningdate = max(period) and Flag=N and B-product=CA,SA as CASA

accountopeningdate = max(period) and Flag=N and B-product=FD and Balance >=250000 as FD

accountopeningdate -= max(period) and Flag=N as YF(i.e the accounts which are not open in max(period))


Thanks in advance,

Dhanu

3 Replies
MK_QSL
MVP
MVP

Are you talking about Max(Period) one for whole data set or per ID?

dhanu_today
Creator
Creator
Author

Thanks for your quick reply.Its per id wise Data set.

MK_QSL
MVP
MVP

TEMP:

LOAD ID,

     AccountNO,

     AOD,

     SRM,

     Custid,

     LSRM,

     Product,

     [B-Product],

     Date(Period) as Period,

     Flag,

     Balance

FROM

TableName;

Left Join

Load Date(Max(Period)) as MaxPeriod Resident TEMP;

NoConcatenate

Load AOD as CASA Resident TEMP

Where Period = MaxPeriod and

Flag = 'N' and

Match([B-Product],'CA','SA');

NoConcatenate

Load IF([B-Product]= 'fd',AOD) as FD Resident TEMP

Where Period = MaxPeriod and

Flag = 'N' and

Balance >= 25000;

NoConcatenate

Load AOD as YF Resident TEMP

Where Period <> MaxPeriod and

Flag <> 'N';