Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to use applymap but I cannot get it to work. I have tried executing a simple example so i could then apply that to what I need but I can't get the simple example to work! :
Table importing from Excel:
%Key | Colour |
1 | 1 |
2 | 2 |
3 | 1 |
Code in script:
Table1:
LOAD *,
ApplyMap('ColourDesc',Colour, 'Unknown')as AColour;
LOAD %Key,
Colour
FROM
C:\Users\Documents\Qlikview\Demo.xls
(biff, embedded labels, table is Sheet1$);
ColourDesc:
MAPPING
LOAD
Colour,
CDescription
INLINE [
Colour, CDescription
1,Red
2,Blue
];
To me it looks the same as all the examples I have looked at but it doesn't want to work as the description is not assigned to AColour
Any help?
Regards
Jason
Load the mapping table first
ColourDesc:
MAPPING
LOAD * INLINE [
Colour, CDescription
1,Red
2,Blue
];
Table1:
LOAD *,
ApplyMap('ColourDesc',Colour, 'Unknown') as AColour;
LOAD %Key,
Colour
FROM
C:\Users\Documents\Qlikview\Demo.xls
(biff, embedded labels, table is Sheet1$);
Load the mapping table first
ColourDesc:
MAPPING
LOAD * INLINE [
Colour, CDescription
1,Red
2,Blue
];
Table1:
LOAD *,
ApplyMap('ColourDesc',Colour, 'Unknown') as AColour;
LOAD %Key,
Colour
FROM
C:\Users\Documents\Qlikview\Demo.xls
(biff, embedded labels, table is Sheet1$);
Hi ,
first u need to have mapping table then u should have the actual code for calculation
ColourDesc:
MAPPING
LOAD
Colour,
CDescription
INLINE [
Colour, CDescription
1,Red
2,Blue
];
Code in script:
Table1:
LOAD *,
ApplyMap('ColourDesc',Colour, 'Unknown')as AColour;
Colour
FROM
C:\Users\Documents\Qlikview\Demo.xls
(biff, embedded labels, table is Sheet1$);
Gysbert,
I said it was simple....
I have wasted half an hour on that.
Thanks very much
Jason