Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I think I know the use of Applymap(), It is used to lookup the date in the mapping table and load into the main table.
I have read a statement that "Applymap() is used to cleanup the data model in Qlikview". I dont understand how Applymap help in to cleanup the data.
1.Could you please help me with an example?
2.What are the general requirements we get to use applymap in your scrips? Please give few examples.
Regards,
Suraj
Applymap helps cleaning up the data model by dropping the table used for mapping.
This means that after the mapping, there's only one table left instead of two connected tables.
Without mapping:
And now the same with Mapping:
Suraj
Does this sample script and attached qvw help explain ?
This could have been done without the applymap() but then you would have had 2 joined tables in your data model, MapColour and Box joined with ColourID.
Having used the applymap() you just have one table and you can also drop the field ColourID.
MapColour:
Mapping LOAD * INLINE [
ColourID, Colour,
1, Red
2, Blue
3, Green
]
;
Box:
LOAD * INLINE [
Box, ColourID
Big, 1
Small, 2
Medium, 1
Squashed ,3
Tiny , 2
];
BoxWithColour :
load
applymap ( 'MapColour', ColourID ) as BoxColour ,
Box
resident Box
;
drop table Box ;
Best Regards, Bill
See Demo Attached with simple example
Applymap helps cleaning up the data model by dropping the table used for mapping.
This means that after the mapping, there's only one table left instead of two connected tables.
Without mapping:
And now the same with Mapping:
Excellent.
Hi, Suraj.
I recommend looking at Steve Dark's blog on using ApplyMap:
http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/
Regards,
Neil