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

How to add 1 more condition on my script for recode 15 brand to 4 brand using Map thru Excel file ?

Hi All

I have below script , it does not give me any error :-

MapBrand:

Mapping LOAD

  [Brand_],

  [SubBrand_]

FROM  mapsubbrand.xlsx (ooxml,embedded labels, table is [Sheet4]);

My excel file have below brand :-

Brand_ SubBrand_

HAKKO HAKKO

BECKHOFF BECKHOFF

MITSUBISHI MITSUBISHI

MITSUBISH MITSUBISHI

GE FANUC GE FANUC

GE GE FANUC

My script when load raw data :-

Applymap('MapBrand',(subfield(@314:343,' ',1)),'OTHER') as [BRAND_],

@314:343T as [desc],  // Pls note this field have more then 10 brand. But it cannot recode project sales. 

@97:100T as [pro_cls],   // prro_cls = 3000 equal to project sales.

Now my issue is all project sales recode into Other ,  i need to add one more condition into the below script, Project sales appear at pro_cls field = 3000 :-

Applymap('MapBrand',(subfield(@314:343,' ',1)),'OTHER') as [BRAND_],

Meaning , ask the above script found missing value at desc field , check pro_cls if = 3000 , recode BRAND_ = PROJECT. ( Now it recode at OTHER , which is wrong )

Hope some one can advise me.

Paul

1 Reply
paulyeo11
Master
Master
Author

Enclosed my QV doc for your reference.