Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
aminehaddar
Contributor II
Contributor II

How to avoid repetition

Hello,

I'm new in qlikView.

I need to load 3 files:  f1.txt , f2.txt and f3.txt that represent a caption of monthly use.

All of them have the same structure: ID, Date.

I used for all of my files:

F:

LOAD

  ID,

          '31-12-2017' as Date_Situation

    

FROM

[.../f3.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes);

LOAD

  ID,

          '30-11-2017' as Date_Situation

    

FROM

[.../f2.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes);

LOAD

  ID,

          '31-10-2017' as Date_Situation

    

FROM

[.../f1.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes);

and store the result in a newfile.txt.

***The result is that I found repetition of the ID, Here I found 2 or more of the same ID . => the same ID but the date is different.

To sum up, I need to get all the ID without repetition. I mean, if I found repetition of an ID, I should find only the ID for the last situation.

Anyone can help please?

Thanks

1 Reply
lironbaram
Partner - Master III
Partner - Master III

hi

try this

F:

LOAD

  ID,

          '31-12-2017' as Date_Situation

   

FROM

[.../f3.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes);

LOAD

  ID,

          '30-11-2017' as Date_Situation

   

FROM

[.../f2.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes)

where not exists(ID);

LOAD

  ID,

          '31-10-2017' as Date_Situation

   

FROM

[.../f1.TXT]

(txt, codepage is 1252, embedded labels, delimiter is '|', no quotes)

where not exists(ID);