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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Field from map not found

I am trying to map the Item Desc field to TableMain then create a new field based on the contents in the Item Desc field however when I Load data I get an error message that says "The following error occurred:Field ‘Item Desc ‘ not found."

Here is my code

MapPop:

Mapping LOAD

    "Local" AS "Location ",

    "Item Desc"

 
FROM [lib://Data/Sheet2.xlsx]

(ooxml, embedded labels, table is Sheet2);

 
TableMain:

LOAD

    "Location ",

    "City",

    "State",

    "Country"

 
       ApplyMap('MapPop’, " Location ", null()) as " Item Desc, ",

 
       IF(WildMatch(Country,'*United States*') and WildMatch(Item Desc,'*Population*'),'Referencible','N/A')AS [Action]

 

FROM [lib://Data/Sheet1.xlsx]

(ooxml, embedded labels, table is Sheet1);

1 Solution

Accepted Solutions
NZFei
Partner - Specialist
Partner - Specialist

TableMain:

LOAD

    "Location ",

    "City",

    "State",

    "Country"

 

       ApplyMap('MapPop’, " Location ", null()) as " Item Desc, ",

 

       IF(WildMatch(Country,'*United States*') and WildMatch(ApplyMap('MapPop’, " Location ", null()),'*Population*'),'Referencible','N/A')AS [Action]

 

 

FROM [lib://Data/Sheet1.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

Move the if statement into a preceding load
you are deriving Item Desc and trying to use it in same load statement
something like
load *,
IF(WildMatch(Country,'*United States*') and WildMatch(Item Desc,'*Population*'),'Referencible','N/A')AS [Action]
;
load
Location
......
NZFei
Partner - Specialist
Partner - Specialist

Are you sure in your spread sheet 2, the column header for item description is called "Item Desc," with a comma at the end?

Anonymous
Not applicable
Author

Tried that and it creates a synthetic key any other suggestions?
NZFei
Partner - Specialist
Partner - Specialist

TableMain:

LOAD

    "Location ",

    "City",

    "State",

    "Country"

 

       ApplyMap('MapPop’, " Location ", null()) as " Item Desc, ",

 

       IF(WildMatch(Country,'*United States*') and WildMatch(ApplyMap('MapPop’, " Location ", null()),'*Population*'),'Referencible','N/A')AS [Action]

 

 

FROM [lib://Data/Sheet1.xlsx]

(ooxml, embedded labels, table is Sheet1);