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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Scenario Help

Hi all,

i have two tables, table1 and table2..

in table1 i have customer key and table2 i have one more customer  key field.

i want to compare where table1 customer1 in not equal to table 2 customer key and have to show sales.

how i can write expression at front end or backend.

thanks

5 Replies
Not applicable

hi,

join both table or concatenate .

i am giving some idea regarding Concatenate

MAIN:

LOAD *, Cust as key1

from table1;

concatenate

LOAD *,Cust as key2

from table 2;

MAIN2:

LOAD *,

if(key1<>key2,customersale) as flag

resident MAIN;

drop table MAIN;

Regards

Vimlesh

PrashantSangle

Hi,

In script ,

You can acheive it using not exist()

try like

MAIN:

LOAD *, Cust as key1

from table1;

table2:

LOAD *,Cust as key2

from table 2

where not exist(key1,Cust);

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
abhaysingh
Specialist II
Specialist II
Author

hi vimlesh,

not possible to concatinate or join table1 and table2. result set has been impacted

Not applicable

hi,

if you want to use in script then both table should be in one table.

else you can do in front end.

Check by which your result data is impacted by concatenate or join  (drop field by field and check).

Regards

Vimlesh

anbu1984
Master III
Master III

Do you want to show sales of customers present in one table and not in other? Try like this

Table1:

Load * From Table1;

Table2:

NoConcatenate

Load *,If(Exists(CustKeyField),0,1) As Flag From Table2;

In UI,

Expr: Sum({<Flag={1}>} Sales)