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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
that_anonymous_guy
Contributor III
Contributor III

ApplyMap is giving common value instead of mapping value?

Hi everyone

I am new to Qlik and I am stuck with ApplyMAp. Could anyone provide me with a solution to this?

People:
Mapping LOAD Region,
Person
FROM
[C:\Users\Downloads\Global Superstore.xls]
(biff, embedded labels, table is People$);

Return:
Mapping LOAD [Order ID],
Returned
FROM
[C:\Users\Downloads\Global Superstore.xls]
(biff, embedded labels, table is Returns$);

Orders:
LOAD [Row ID],
[Order ID],
[Order Date],
[Ship Date],
[Ship Mode],
[Customer ID],
[Customer Name],
Segment,
City,
State,
Country,
[Postal Code],
Market,
Region,
ApplyMap('People',Region) as Manager ,
[Product ID],
Category,
[Sub-Category],
[Product Name],
Sales,
Quantity,
Discount,
Profit,
[Shipping Cost],
[Order Priority],
ApplyMap('Return',[Order ID]) as Returned
FROM
[C:\Users\Downloads\Global Superstore.xls]
(biff, embedded labels, table is Orders$);

 

 

I am using two mapping tables. I am getting the desired output with the People table but with Return table it is giving me [Order ID] instead of Returned.

Please let me know if additional information is required.

Thanks

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

You don't have specified the third parameter from applymap() and therefore it used the second parameter for it. Better is therefore usually to apply an own parameter, like:

ApplyMap('Return',[Order ID], 'no match')

In regard why the matching didn't work take a look if you really load and compares the right fields and if they have the right values, for examples lookup-values as numbers won't match with string-values within the mapping-table.

- Marcus

 

View solution in original post

2 Replies
marcus_sommer

You don't have specified the third parameter from applymap() and therefore it used the second parameter for it. Better is therefore usually to apply an own parameter, like:

ApplyMap('Return',[Order ID], 'no match')

In regard why the matching didn't work take a look if you really load and compares the right fields and if they have the right values, for examples lookup-values as numbers won't match with string-values within the mapping-table.

- Marcus

 

that_anonymous_guy
Contributor III
Contributor III
Author

thanks..it worked