Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
aatish12345
Creator II
Creator II

Grouping of values from same field

Hello Everyone,

I have a field consisting of below values

Field1:

A

B

C

D

E

Here I want to group only A , B and C together and called it as 'Group1' and want to keep D as it is and the value E should not appear in the final output as shown below:-

New Field:

Group1,

D

Can you please help me achieve this?

 

Aatish

 

 

 

2 Solutions

Accepted Solutions
sasikanth
Master
Master

HI, 

try below one

load *, If(Field1='A' Or Field1='B' Or Field1='C','Group1', if(Field1='D','D')) as New_Field;

load * inline

[

Field1:

A

B

C

D

E

];

 

View solution in original post

anat
Master
Master

Can u try using applymap by creating mapping table

View solution in original post

3 Replies
sasikanth
Master
Master

HI, 

try below one

load *, If(Field1='A' Or Field1='B' Or Field1='C','Group1', if(Field1='D','D')) as New_Field;

load * inline

[

Field1:

A

B

C

D

E

];

 

anat
Master
Master

Can u try using applymap by creating mapping table

aatish12345
Creator II
Creator II
Author

Hi Sasikant and Anat...

Both the solutions are working as expected...

Thanks 

 

Aatish