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

QUESTION

Hi,

Appreciate, if looked in to how accurate it is written in the script!. There are number of products which are refered to as different classes such as

MC,M3,M4,FR,MS,HH,TC,PP,SA etc.

above are in a field which is named as class_code, when I load the said field, what I need is to catergorize them in to two main classes namely MO & NM thereby create a new field as MONM. Please see the way I have done.

Load,

Class_code,

if (Class_code='mc','motor',if(class_code='m3','motor',if(class_code='m4','motor,'nonmotor' as monm,

The issue is once it is done, catergorization is not properly done. Look forward to a  reply.

Thanks

Neille.

1 Solution

Accepted Solutions
passionate
Specialist
Specialist

Hi Neville,

Please mark the answer correct if your query is resolved.

The thread can be closed.

Thanks and Regards,

Pankaj

View solution in original post

3 Replies
passionate
Specialist
Specialist

Try:

pick(Match(Class_code,'mc','m3','m4')+1,'nonmotor','motor','motor','motor')

nevilledhamsiri
Specialist
Specialist
Author

Dear Pnkaj,

Thanks, It worked well.

passionate
Specialist
Specialist

Hi Neville,

Please mark the answer correct if your query is resolved.

The thread can be closed.

Thanks and Regards,

Pankaj