Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
stonecold111
Creator III
Creator III

Where not exist in autoconcatenation

Hi qlikss,

I have 2 files in folder. Names of files.

I) daily_ 1.txt

Ii) daily_2.txt

I am loading into qliksense by using  *

Load * from daily_*.txt.

When I load I want to check whether record exist in first table by using id field in tables.

How can I do this when I am loading like this.

 

 

11 Replies
stonecold111
Creator III
Creator III
Author

stonecold111
Creator III
Creator III
Author

Sample table:

Daily_1

I'd.   Value

1.      100

Daily_2

I'd.   Value

1       200

2.      300

Final table

I'd.    Value

1.      100

2.      300

rwunderlich
MVP & Luminary
MVP & Luminary

Have you tried:

Load * from daily_*.txt
Where not Exists(id);

-Rob

stonecold111
Creator III
Creator III
Author

Thanks Rob.

 

stonecold111
Creator III
Creator III
Author

Hi Bob,

It's working fine for where not exists ,

But when I use where exists it's fetching 0 records

It should be 

Final table

1.    100

1.    200

stonecold111
Creator III
Creator III
Author

rwunderlich
MVP & Luminary
MVP & Luminary

If you use

Where exists(id)

for every load nothing will get loaded. Because nothing has been loaded yet, the count of existing ids is zero.

-Rob

QFabian
Specialist II
Specialist II

Hi @stonecold111 , here i made this sample, please check it :


Daily_1:
Load * INLINE [
Id1, Value
1,100
];

Daily_2:
Load * INLINE [
Id2, Value
1, 200
2, 300
];

Final:
Load
Id1 as ID,
Value
Resident Daily_1;

Load
Id2 as ID,
Value
Resident Daily_2
Where not Exists(ID, Id2);

drop tables
Daily_1, Daily_2

QFabian
stonecold111
Creator III
Creator III
Author

Hi Fabian,

I provided sample data . I have to  auto concatenate 

5 Excel files. I need to take only IDs from latest file and need to check whether same I'd s are there from previous files.

So, final table

All IDs from latest file.+ Any matching IDs from previous 9 files.

Example:

In folder I have 2 files.

First excel copied to this folder at 10 am

Data in first excel

I'd.  Name 

1.     100

5.     500

Second excel file copied into this folder at 11 am

Data in second excel

1    200

6   600

When I refresh at 10.30 am

My output is

I'd.  Name 

1.     100

5.     500

When I refresh at 11.30 am

1.  200

1.   100

5.   500

Like this in a day 5 Excel files are going to add to this folder at different intervals. I have multiple refreshes for this.