Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nnn16
Contributor
Contributor

Grouping in a column in expression editor

I have a column filled with codes. I have recently been asked to group the codes. ie i want codes 1234, 2345, and 3210 to be called Apple. Then I want 4567, 7890, and 7654 to be called Banana. We don't have groupings for all the codes yet, only three groups. Is there a way to show just those three groups in a filter pane? I was thinking first create a filter pane for the codes and then go to the expression editor. I was trying something like this : =if(Match(Code, '1234', '2345', '3210'), 'Apple'. But it kept showing an error. Anyone have any ideas or do I need to edit my code instead and create groupings there. 

Labels (4)
1 Reply
Chanty4u
MVP
MVP

Try this 

=if(Match(Code, '1234', '2345', '3210'), 'Apple',

    if(Match(Code, '4567', '7890', '7654'), 'Banana', 'Other')

)