

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Applymap() scenarios
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
- Tags:
- new_to_qlikview
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See Demo Attached with simple example
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excellent.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
