Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

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
Valued Contributor II

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

Enclosed my QV doc for your reference.

Community Browser