Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
need help on labeling values. Currently in load statement I have a extremely long if statement: if (var='1' or var='x' or var='p' or ........., 'basic', 'special') so for each line within my main table, there is a value for var.
is there a way to make things shorter and more professional?
HI
Try match function
Like
Load *, if(match(var,'1','x','p'),'basic','special') as fieldname from tablename;
Hope it helps'
Hi,
Use For loop for different stages calculation.
Regards,
Anand
could you provide an example?
HI
Try match function
Like
Load *, if(match(var,'1','x','p'),'basic','special') as fieldname from tablename;
Hope it helps'
Hi. I believe you need the MATCH() function.
You can compare a unique expression with a list of values a lot easier:
MATCH($(VAR), '1', 'x', 'p', 'special', ...)
Look at QlikView's help description for more examples.
Regards.