Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The following is a possible key combination for 4 fields, X and _ to create auth key (based on section access more than one field | Qlik Community)
Load XXXX as Key from Transactions
Load _XXX as Key from Transactions
Load X_XX as Key from Transactions
Load XX_X as Key from Transactions
Load XXX_ as Key from Transactions
Load __XX as Key from Transactions
Load XX__ as Key from Transactions
Load _XX_ as Key from Transactions
Load X_X_ as Key from Transactions
Load _X_X as Key from Transactions
Load X__X as Key from Transactions
Load ___X as Key from Transactions
Load __X_ as Key from Transactions
Load _X__ as Key from Transactions
Load X___ as Key from Transactions
Load ____ as Key from Transactions
I want to create similar kind for 5 fields(XXXXX)..can any one help me how to generate possible keys for the 5 fields?
Thanks.
Gautham
maybe something like this :
FOR Each vValue1 in 'X','_'
LET p1 = '$(vValue1)';
FOR Each vValue2 in 'X','_'
LET p2 = '$(vValue2)';
FOR Each vValue3 in 'X','_'
LET p3 = '$(vValue3)';
FOR Each vValue4 in 'X','_'
LET p4 = '$(vValue4)';
FOR Each vValue5 in 'X','_'
LET p5 = '$(vValue5)';
final:
LOAD
'$(p1)' & '$(p2)' & '$(p3)' & '$(p4)' & '$(p5)' as final
AutoGenerate(1);
NEXT
NEXT
NEXT
NEXT
NEXT
;
i just need to create combinations of 5 fields
eg
F1,F2,F3,F4,F5
F1,F2,F3,F4,ANY
F1,F2,F3,ANY,F5
....
....
like this
i want to create keys for auth table.somehow i dont know easiest way to create all possible combinations
maybe something like this :
FOR Each vValue1 in 'X','_'
LET p1 = '$(vValue1)';
FOR Each vValue2 in 'X','_'
LET p2 = '$(vValue2)';
FOR Each vValue3 in 'X','_'
LET p3 = '$(vValue3)';
FOR Each vValue4 in 'X','_'
LET p4 = '$(vValue4)';
FOR Each vValue5 in 'X','_'
LET p5 = '$(vValue5)';
final:
LOAD
'$(p1)' & '$(p2)' & '$(p3)' & '$(p4)' & '$(p5)' as final
AutoGenerate(1);
NEXT
NEXT
NEXT
NEXT
NEXT
;