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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

DATA LOAD

Hi,

In my QV document I have followinf script

sales1:

LOAD 

       POLICY_NO,

     MID(POLICY_NO,5,2)AS POLICY_YEAR,

     POL_SUM_INSURED,

     POL_PERIOD_TO,

     ME_CODE,

          TRN_TYPE,

     POL_TYPE,

          POL_STATUS,

     REF_NO,

     RC_TRN_TYPE,

    DATE(T_DATE,'DD-MM-YY')AS T_DATE  , //tranaction date

      TRN_DATE, //risk date

      CP,

     PREMIUM

    

FROM

d:\Qlikview\QVD\FACT_Table\Sales.qvd

(qvd)

WHERE  match(POLICY_NO,'MO00101C001855','MO00111C002019')

Temp:

Load

  *

Where NET_PRE=0;

Load Sum(PREMIUM) as NET_PRE,

POL_PERIOD_TO AS PER_TO,

POLICY_NO as PLNO

Resident sales1 Group By POLICY_NO,POL_PERIOD_TO;

sales:

NoConcatenate

Load

  *

Resident sales1 where  Exists (PER_TO,POL_PERIOD_TO)and Exists(PLNO,POLICY_NO) ;

drop table sales1,Temp;

After Loading data I get follwing out put

POLICY_NOPOL_PERIOD_TOGROSS_PREMIUMREFUNDS
MO00101C0018554209328,6050
MO00101C0018554282445,505-45,505
MO00111C0020194209317,765-17,765

But in my output report I do not want Top row to apper. I only want records where gross premium is positive amount and exact negative value  as refunds to be shown. Can some educate how should I modify the syntax to load donly relevant data

9 Replies
robert_mika
Master III
Master III

Is IREFUNDS expression or Field?

upaliwije
Creator II
Creator II
Author

An Expression

SUM({$<POL_TYPE={'F'}>}PREMIUM)  = REFUNDS

upaliwije
Creator II
Creator II
Author

p

upaliwije
Creator II
Creator II
Author

I have attached my QV document. Pls advise

robert_mika
Master III
Master III

Could you attached the Excel file?

upaliwije
Creator II
Creator II
Author

Yes of course

Not applicable

Hi, I used your data and script i got the expected result for you.

Please look into the attached app. please correct me if do wrong.

upaliwije
Creator II
Creator II
Author

in your QV document all data is loaded including records that are not required. What I want is to load only recors where poistive vales and negative values are same

upaliwije
Creator II
Creator II
Author

Can You pls help me