Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Mapping

Hello All,

I need to map all those starting by Status_description AP001 to the status code AP001.

Example:

Status_Description          Status_Code

AP001 THUR                    AP001

AP001 ERTD                    AP001

AP001 PLYT                     AP001

So I created a Mapping as below:

Map:

     Mapping load * inline [

     Status_Description,Status_Code

     AP001* , AP001

But it does not work.

Any idea?

KR,

Hasvine

6 Replies
mark6505
Valued Contributor III

Re: Mapping

Hi,

I think it will be down to the '*', not sure it is works with the wildcard in a mapping.

What is it your trying to do?

Have you thought about mapping usign the subfield() function.

SUBFIELD(Status_description,' ',1) as Status_Code

Mark

MVP
MVP

Re: Mapping

Mapping doesn't work with wildcards. Try with WildMatch(), like:

Load

          if(WildMatch(Field, 'AP0001*') , 'AP0001' , Field) as NewField

MVP
MVP

Re: Mapping

Or, even try with MapSubstring(). You may refer: Re: Wildcard when ApplyMap

vsudhakar
Contributor III

Re: Mapping

Like useful compare the fields

Highlighted
balrajahlawat
Esteemed Contributor

Re: Mapping

Try somthing like?

Where/IF  Status_Description like 'AP001*'    

sathishkumar_go
Contributor III

Re: Mapping

Try this,

if(left(Status_Description,5) = 'AP001','AP001') AS status_code

-Sathish

Community Browser