Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I want to load following statement in Qlikview
Field1= Case
When DLT = 'ABC' then PQR
When DLT = 'CCC' then PQR
When DLT = 'DDD' then DDD
End
Field2 ...
Regards
Vikas
Pick(Match(DLT, 'ABC', 'CCC', 'DDD'), 'PQR', 'PQR, 'DDD') As Field1
Pick(Match(DLT, 'ABC', 'CCC', 'DDD'), 'PQR', 'PQR, 'DDD') As Field1
load
...
if (DLT='ABC' or DLT='CCC', 'PQR', DLT) as Field1,
if you have always different values to compare
load
..
if (DLT='ABC', 'PQR',
if (DLT='CCC', 'PQR',
if (DLT='DDD', 'DDD',
if (DLT=..., as Field1
Thanks
Works
Vikas
Also you can maintain a table of correspondece and use applymap
Map_correspondece:
Mapping LOAD * Inline [
Key, Value
ABC, PQR
CCC, PQR
DDD, DDD
];
LOAD ApplyMap('Map_correspondece', DLT, [value_if_not_found]) as Field1
...
The Map_correspondence table can be loaded from any source allowing maintenance outside QV script.