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: 
jtkerlin
Contributor
Contributor

Applymap syntax help

Working with Applymap for the first time and getting incorrect results. 

I think it has something to do with the first line 'Production Code', Production.  When I run this I get the "Missing" as the result for all lines, rather than New = New, etc.

MAP_Production:
Mapping LOAD *
    Inline [
    'Production Code', Production
    New, New
    Renewal, Renewal
    Expanded, Expanded];

 

LOAD
"Production Code",
ApplyMap('MAP_Production', 'Production Code', 'Missing') as Production,
FROM [lib://2019.xlsx]
(ooxml, embedded labels, table is [Report-1];

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

I think single quotes around the field name is not right, try this

MAP_Production:
Mapping
LOAD * Inline [
    Production Code, Production
    New, New
    Renewal, Renewal
    Expanded, Expanded
];

LOAD "Production Code",
     ApplyMap('MAP_Production', "Production Code", 'Missing') as Production
FROM [lib://2019.xlsx]
(ooxml, embedded labels, table is [Report-1];

View solution in original post

1 Reply
sunny_talwar

I think single quotes around the field name is not right, try this

MAP_Production:
Mapping
LOAD * Inline [
    Production Code, Production
    New, New
    Renewal, Renewal
    Expanded, Expanded
];

LOAD "Production Code",
     ApplyMap('MAP_Production', "Production Code", 'Missing') as Production
FROM [lib://2019.xlsx]
(ooxml, embedded labels, table is [Report-1];