Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

Mapping Table Issue

When I am trying to map a table, it is only converting the label/column title and not the data in the fields below? has anyone seen this issue before?

Thanks

Tags (1)
6 Replies
Highlighted
Honored Contributor II

Re: Mapping Table Issue

Is it possible to share a small sample file?

Highlighted
Not applicable

Re: Mapping Table Issue

can give you the general template:

MAPPINGTABLE:

MAPPING LOAD

     'existing'

     'desired'

FROM 'file.xls'

(biff, embedded labels, table is [sheet1$]

Rename FIELDS USING MAPPINGTABLE;

Highlighted
Not applicable

Re: Mapping Table Issue

Do I need to use applymap?

I don't really understand where to put the function though, as it seems to not work on the correct table

Highlighted
Valued Contributor

Re: Mapping Table Issue

check your spelling /case sensetive . That is usually the issue.

Highlighted
Honored Contributor II

Re: Mapping Table Issue

I am not sure what exactly you are trying to do based on the sample you provided. Have you taken a look at the help. In help you have examples, so that you can understand better,

Highlighted
MVP & Luminary
MVP & Luminary

Re: Mapping Table Issue

You have correctly created the mapping table. The particular way you are using the mapping table:

Rename FIELDS USING MAPPINGTABLE

will rename field names, it does not change field contents.


If you want to change the contents (values) of a field, use either the MAP statement or the ApplyMap function.


For example, to change the map value in the Customer field:


MAP Customer USING MAPPINGTABLE;

Place the MAP statement in the script before the Customer table is loaded.


To map values as they are loaded, use the ApplyMap() function in a load statement.


LOAD

     id,

     City,

     ApplyMap('MAPPINGTABLE', Customer) as Customer

FROM xyz.xls....


-Rob

http://masterssummit.com

http://qlikviewcookbook.com