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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

compare two primary field

I have tables like below

Table1:

Company

ServiceDate

Table2:

Company

WorkDoneDate

how can i create straight table that shows difference between field of company (from table1) to company in table2.

In other words table will show company that exist in one table and does not exist in other and vice versa along with the table name.

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Use Company as Dimension

Check with expression as if(isNull(ServiceDate) and not isNull(WorkDoneDate),'Exists in Table2',if(isNull(WorkDoneDate) and not isNull(ServiceDate), 'Exists in Table1', 'Exists in Both'))

Because If the company is not exisits in other table then it maps values as null. In other words missing values are considered as Null.

MayilVahanan

HI

Are you asking like this

Qualify*;

Table1:

Company

ServiceDate;

Table2:

Company

WorkDoneDate;

by using that, you can see the tablename along with company..

or

are you like this

Table1:

Load company,serviceDate from table1;

Table2:

Load company,workDoneDate from table2 where exists(company,company);

in this, it loads the company in table2 where those company name exists in table1.

or

in table:

company as dimension:

if( isnull(WorkDoneDate) = -1,'exists in table2', 'exists in table1')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
userid128223
Creator
Creator
Author

I need to keep table 1 and table 2 as is with company name common.

However I just want to find bad data quickly by comparing where company exist in one and does not exist in another.

I was thinking of doing a seperate load of two table via outerjoin. and then call them in straight table to show company where it does not match in both tables.

how would i do that.

MayilVahanan

HI

Try like this

Table1:

Load * from table1;

join(Table1)

Load *  from table2;

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.