Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Compare multiple columns

Hi,

at 1st i load this data. Tablename: tableA

2017-01-20_10h08_45.jpg

After that i load this table tableB. In the load script i want to add the column Found...

2017-01-20_10h16_46.jpg

...and want to compare the columns Product, SalesNumber, Customer of each record with data from tableA.

If the value of each column identical, then Found should get the value "x".

How can i do it?

Regards,

sam

1 Solution

Accepted Solutions
sunny_talwar

May be this:

TableA:

LOAD *,

     AutoNumber(Product&SalesNumber&Customer) as Check;

LOAD Date,

     Product,

     SalesNumber,

     Customer

FROM TableA;

TableB:

LOAD Date,

     Product,

     SalesNumber,

     Customer,

     If(Exists(Check, AutoNumber(Product&SalesNumber&Customer)), 'x') as Found

FROM TableB;

DROP TableA;

View solution in original post

3 Replies
Not applicable
Author

Hi,

We can use Apply map function if it has a unique column, I'm looking forward to the answer how it is done without a unique column,

Regards,

prem

sunny_talwar

May be this:

TableA:

LOAD *,

     AutoNumber(Product&SalesNumber&Customer) as Check;

LOAD Date,

     Product,

     SalesNumber,

     Customer

FROM TableA;

TableB:

LOAD Date,

     Product,

     SalesNumber,

     Customer,

     If(Exists(Check, AutoNumber(Product&SalesNumber&Customer)), 'x') as Found

FROM TableB;

DROP TableA;

Anonymous
Not applicable
Author

Hi Sunny,

seems to work, many thanks.

Regards,

Sam