Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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
Highlighted

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'

View solution in original post

4 Replies
Highlighted

Re: labeling values in load statement

Hi,

Use For loop for different stages calculation.

Regards,

Anand

Highlighted
Creator
Creator

Re: labeling values in load statement

could you provide an example?

Highlighted

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'

View solution in original post

Highlighted
Partner
Partner

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.