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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with applymap

Hi,

I have a problem with qlikview where my applymap does not work. It constantly returns '-' as a result.

I have loaded table Product status before the Sales table. I trimmed the field & made it an upper & checked.

And there are other applymaps in the same file which do work, though not with the PCode key.

Any help is much appreciated.

The code I use is as below

Product_Status:

Load

     PCode,

     Validity

from...

Pcodemapping:

mapping load

     PCode,

     Validity

resident Product_Status;

Sales:

Load

     Product_Code,

     Sales_value

from...

Sales_final:

     load *,

     applymap('Pcodemapping',Product_Code,'Not in Status table') as Status

resident Sales;

drop table Sales;

Thanks very much in advance!

2 Replies
Anonymous
Not applicable
Author

Hi

Works fine here. Try to uplad application.

Product_Status:

Load

     PCode,

     Validity

from [139200.xlsx] (ooxml, embedded labels, table is Sheet1);

Pcodemapping:

mapping load

     PCode,

     Validity

resident Product_Status;

Sales:

Load

     Product_Code,

     Sales_value

from [139200.xlsx] (ooxml, embedded labels, table is Sheet2);

Sales_final:

     load *,

     applymap('Pcodemapping',Product_Code,'Not in Status table') as Status

resident Sales;

drop table Sales;

By the way, works great a littel shorter as well, if you don't use the Product_Status table for anything else:

 

Pcodemapping:

mapping load

     PCode,

     Validity

from [139200.xlsx] (ooxml, embedded labels, table is Sheet1);

Sales_final:

     load *,

     applymap('Pcodemapping',Product_Code,'Not in Status table') as Status

from [139200.xlsx] (ooxml, embedded labels, table is Sheet2);

Not applicable
Author

Thanks Nicolai for the shortcut.