Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

yelin_nyu
Contributor

labeling values in load statement

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?

Tags (4)
1 Solution

Accepted Solutions

Re: labeling values in load statement

HI

Try match function

Like

Load *, if(match(var,'1','x','p'),'basic','special') as fieldname from tablename;

Hope it helps'

4 Replies

Re: labeling values in load statement

Hi,

Use For loop for different stages calculation.

Regards,

Anand

yelin_nyu
Contributor

Re: labeling values in load statement

could you provide an example?

Re: labeling values in load statement

HI

Try match function

Like

Load *, if(match(var,'1','x','p'),'basic','special') as fieldname from tablename;

Hope it helps'

diegofcaivano
Contributor

Re: labeling values in load statement

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.

Community Browser