Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use mapping function for certain customers

Hi,

I have a source file with fields customer and country .Currently a,b,c customers are marked as Germany customers,and other customers say d,e,f...belong to Germany or different countries.

Now the requirement is to implement a generic solution to change it to Austria customers without hard coding in script.

What i have tried:

MAP:

MAPPING LOAD
Country,

newCountry

from mappingfile;(created one)

Datamodel:

ApplyMap('MAP',"E") AS [Customer Country] ,

Result:

Now a,b,c customers are mapped to new country but other customers say z which is having Germany as country will also be mapped to Austria. Hence how to apply condition(if any other) here?Can anyone help here?

1 Reply
sunny_talwar

May be something like this

If(Match(Customer, 'a', 'b', 'c'), ApplyMap('MAP',"E"), "E") AS [Customer Country]