Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fatihsahin
Partner - Contributor
Partner - Contributor

Applymap / Mapping function issue

Hi,

following questions lets say I have following table:

Facts:

CustomerID          CustomerNane    Type     Flag    

1                              aaa                    a         Y

2                              bbb                    b         N

3                              ccc                    c         N

Than I have a mapping  date in excel with following structure:

Mapping:

CustomerID     CustomerName Flag

1                               aaa           N       

2                               bbb           Y

So basically I will overwrite the Flag where I have match with the ID but I want to this ONLY FOR "Type" a and b  - TYPE 'c' should be not checked...

¨

A simple applymap is not doing that. Could anyone help please?

Regards

1 Solution

Accepted Solutions
marcus_sommer

Why not, this would work like you described it:

if(Type <> 'c', applymap('Mapping', CustomerID, Flag), Flag) as NewFlag

(a mapping-table had only two fields and need a mapping-qualifier)

- Marcus

View solution in original post

2 Replies
marcus_sommer

Why not, this would work like you described it:

if(Type <> 'c', applymap('Mapping', CustomerID, Flag), Flag) as NewFlag

(a mapping-table had only two fields and need a mapping-qualifier)

- Marcus

sasiparupudi1
Master III
Master III

Mapping:

Mapping LOAD CustomerID&CustomerName as Key,Flag

Inline

[

CustomerID,CustomerName,Flag

1, aaa, N    

2,bbb,  Y

];

LOAD CustomerID,CustomerName,Type,

if(Type<>'c',ApplyMap('Mapping',CustomerID&CustomerName,'NA'),Flag) as Flag

Inline

[

CustomerID,  CustomerName,Type,Flag  

1,aaa,a, Y

2, bbb, b, N

3,ccc,c, N

];

HTH

Sasi