Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a new grouping field out of existing field

Hi All,

I want to create a new field name grouping based on another felid like this:

field 1, new field

a,     x

a,     x

b,     y

b,     y

c,     x

d,     x

f,     y

Means I want to say if filed 1 is a,b,c,d then new filed is x and if it's b,f then is y.

Thanks,

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

Load *,if(match(field1,'a','c','d'),'x','y') as NewField;

Load * Inline

[

field1

a

a

b

b

c

d

f

];

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

HI

Try like this

Load *,if(match(field1,'a','c','d'),'x','y') as NewField;

Load * Inline

[

field1

a

a

b

b

c

d

f

];

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.