Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

XOR Operation in Qlikview


I have 2 fields from 2 different table and want to perform an XOR operation on the values of respective field. Kindly help me achieve the result through scripting.

9 Replies
tresesco
MVP
MVP

XOR - logical operator is also available in qv.

Not applicable
Author

Amir,

may you attach sample with your data?

regards

Darek

Not applicable
Author

Correct Files

Complete_08MAY2014_2008.xlsx
Complete_12MAY2014_0654.xlsx
Open_13MAY2014_0106.xlsx
Closed_09MAY2014_1530.xlsx
Escalated_13MAY2014_1512.xlsx
All Files
Complete_08MAY2014_2008.xlsx
Complete_12MAY2014_0654.xlsx
Open_13MAY2014_0106.xlsx
Closed_09MAY2014_1530.xlsx
Escalated_13MAY2014_1512.xlsx
Level3_15MAY2014_1512_dummy1.xlsx
Level2_15MAY2014_1512_dummy2.xlsx

These are the two tables and their respective field with Values. 

Thanks

Amir

Not applicable
Author

??

have you already tryed to start preapre this application in QV?

Not applicable
Author

Hi Dariusz,

I have created a table of file name which have been successfully reloaded (Correct Files) and another table with all the file names at a directory from where the Qlikview is reloading the file. I will perform an XOR operation on both these table to get the file names which have not been reloaded successfully. Hope this gives you enough backgroung of my objective. 

Thanks,

Not applicable
Author

in load you may use where not exists clause. It let you load only those rows, which are not present in previously loaded table.

regards

Darek

maxgro
MVP
MVP

1.png

Files:

load *, 1 as Type1 inline [

Field1

Complete_08MAY2014_2008.xlsx

Complete_12MAY2014_0654.xlsx

Open_13MAY2014_0106.xlsx

Closed_09MAY2014_1530.xlsx

Escalated_13MAY2014_1512.xlsx

MyNewFileForTest.doc

];

join (Files)

load *, 1 as Type2 inline [

Field1

Complete_08MAY2014_2008.xlsx

Complete_12MAY2014_0654.xlsx

Open_13MAY2014_0106.xlsx

Closed_09MAY2014_1530.xlsx

Escalated_13MAY2014_1512.xlsx

Level3_15MAY2014_1512_dummy1.xlsx

Level2_15MAY2014_1512_dummy2.xlsx

];

left Join (Files)

load Field1,

if(rangesum(Type1,Type2)=1,1,0) as xor

Resident Files;

Not applicable
Author

Thank you all.. I have been able to successfully develop the functionality.

Not applicable
Author


Thanks Massimo,

Your code was helpful in a way to achieve the result. However, I did not use infile..I had those table already reloaded so applied XOR on them.