Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
XOR - logical operator is also available in qv.
Amir,
may you attach sample with your data?
regards
Darek
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
??
have you already tryed to start preapre this application in QV?
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,
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
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;
Thank you all.. I have been able to successfully develop the functionality.
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.