Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ben0109
Contributor III
Contributor III

Join Excel table with qvd without duplicate values

Hi

I receive Excel files every month (the file name is always the same) and need to add it to my qvd. My script moves the file to another folder after being uploaded. 

The issue is that each time the script runs, the entire document is uploaded, resulting in duplicate values being added together and my app's data is skewed by this.

I basically want the load script to check if the row entry exists and if it does, skip to the next row (and check again). 

This is the current load script I have:

Let FileDateValue = Peek('Date', 0, 'NEW DATA');

 [OLD DATA]:

NoConcatenate

LOAD

            *

        FROM [$(QvdPath)]

        (qvd) 

        Where Date <> '$(FileDateValue)';

        Concatenate ([OLD DATA])

        LOAD

        *

        Resident [NEW DATA];

        Drop Table [NEW DATA];

        Store [OLD DATA] Into '$(QvdPath)';

        Drop Table [OLD DATA];

Just a side note, my table has the following columns:

- Code

- Description

- Office

- Transaction type

- Sum(Value) 

Any help will be highly appreciated. 

1 Reply
campbellr
Creator
Creator

Hi Ben

You can put in a where Not  exists (<Key field>,<Key field2>) clause in the load for the new data, so long as you have a suitable key field or combination of fields.

 

Ron