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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional load

Hi all,

I'm struggling to solve the following.

Every organisation has an adress type A and some also have an adress type B or ....

I would like to load the adress of all organisations with adress type B and A otherwise.

So I've got the following:

OrganisationAdress typeAdress
1AV
1CW
1BX
2AY
2CZ

And I would like to load:

OrganisationAdress typeAdress
1BX
2AY

I've tried it by using the Match and Minstring function but can't get it to work.

Anyone knows a solution? Would be of great help!!

Labels (1)
3 Replies
MK_QSL
MVP
MVP

Temp:

LOAD * Inline

[

  Organisation, Adress type, Adress

  1, A, V

  1, C, W

  1, B, X

  2, A, Y

  2, C, Z

];

NoConcatenate

Temp2:

Load Distinct Organisation, Organisation as ORGTEMP, [Adress type], Adress Resident Temp Where [Adress type] = 'B';

Concatenate

Load Distinct Organisation, [Adress type], Adress Resident Temp Where NOT Exists (ORGTEMP, Organisation) and [Adress type] = 'A';

Drop Table Temp;

Drop Field ORGTEMP;

Anonymous
Not applicable
Author

Thanx a lot!!!

Changed a little bit in the script. Not working with inline since the file in fact consists of 160.000 lines.

However the lower part seems to function well!

MK_QSL
MVP
MVP

I have tested with million records here and it's working fine with some different example...

It should work.. Let me know what you have changed in your script !