Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.

Tags (3)
9 Replies
MVP
MVP

Re: XOR Operation in Qlikview

XOR - logical operator is also available in qv.

Not applicable

Re: XOR Operation in Qlikview

Amir,

may you attach sample with your data?

regards

Darek

Not applicable

Re: XOR Operation in Qlikview

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

Re: XOR Operation in Qlikview

??

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

Not applicable

Re: XOR Operation in Qlikview

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

Re: XOR Operation in Qlikview

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

MVP
MVP

Re: XOR Operation in Qlikview

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

Re: XOR Operation in Qlikview

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

Not applicable

Re: XOR Operation in Qlikview


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.

Community Browser