Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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 (2)
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];