Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
panipat1990
Creator II
Creator II

Logic

Dear Team,

I stuck a requirement.

Supoose we have a sale data Only 3 dec 2016

ID       Date              Site     Sale

101      3-dec-2016          A       100

102      3-dec-2016          A       200

103      3-dec-2016          A       300

104      3-dec-2016          A       400

I loaded in qlikview And Store 3 dec data in qvd.... And delete excel file from source where sale data is kept.

Then next day 4 dec 2016 new excel file is updated in data sorce.

When i load in qlikview and save the data in qvd....and delete the execl from source.....

But when i reach 5 dec 2016 then i updated the data of 3 dec 2016....above id 101 regading sale is coming 100..But it should be 1000...

When i new excel file 3 dec 2016 is loaded again..then it show sum of sale regarding 101 means 1100..But it should be Only 1000.

How is possible in qlikview..

Kindly help me..

4 Replies
krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

You need to use Incremental load logic to achieve this.

But I doubt for the ID 101 on 3Dec, the sales is 100 only. if you sum up based on date it will 1000.

maxgro
MVP
MVP

Could you post some more data from the excel source, 4 and 5 december

and the expected result?

panipat1990
Creator II
Creator II
Author

Dear Sir,

Pfa the Data

maxgro
MVP
MVP

Hope to understand, PFA

//

// make qvd for test

//

for sheet=3 to 6

  LET file='201612' & num($(sheet), '00') & '.qvd';

  Data:

  LOAD Site, ID, Date(Date) as Date, Sale

  FROM   [Data For Testing.xlsx] (ooxml, embedded labels, table is [$(sheet) Dec]);


  STORE Data into [$(file)] (qvd);


  DROP Table Data;

next;

//

// read qvd in descending order

//

for day=6 to 3 step -1

  LET file='201612' & num($(day), '00') & '.qvd';

  TRACE $(file);

  Data:

  LOAD *

  FROM [$(file)] (qvd)

  Where not Exists (ID) ;

next;

1.png