Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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);
Thanks Nicolai for the shortcut.