Discussion board where members can get started with QlikView.
Hi to all,
I have two variables that i've setted like this:
Load concat(Distinct InactiveCAL,';') as CALToRemove
let CALToRemove = peek('CALToRemove',0,'tmp');
drop table tmp;
Load CAL as WLCAL
let CALinWL = peek('WLCAL',0,'wltmp');
drop table wltmp;
The result is some like USERNAME1;USERNAME2;USERNAMEN for the 2 variables.
My problem now is that i need to compare this two varialbes to obtain a final value in another variable, for example:
Var1 = User1;User2;User3;User4 <-- This are the values to remove
Var2 = User1;User3 <-- This is my WhiteList
VarFin = User2;User4 <-- This value is the result of filter with Var2
Any idea how to filter this string?
Thanks in advance.
I've solved the problem using only the tables instead of strings of concatenate value in temporal tables:
Table 1 --> InactiveCAL
Table 2 --> WLCAL
let nRows = NoOfRows('Table 1');
LET removeCalList = Null();
FOR i = 0 to $(nRows)-1
LET CALInactive = peek('InactiveCAL', i, 'Table 2');
LET whiteListed = lookup('WLCAL', 'WLCAL', CALInactive, 'Table 1') ;
IF IsNull(whiteListed) then
IF IsNull(removeCalList) then
removeCalList = CALInactive;
removeCalList = CALInactive & ';' & removeCalList;
Thanks for our time
View solution in original post
May be create a third table like this:
Load SubField(CAL, ';') as Check
LOAD Concat(VarFin, ';') as VarFin;
LOAD InactiveCAL as VarFin
Where not Exists(Check, InactiveCAL);
LET VarFin = Peek('VarFin', 0, 'VarFinTable')'
DROP Tables TempTable, VarFinTable;