Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Rename fields by mapping table in Qlik Sense

Hi Folks,

does anybody have an example or qfv-file, how to rename fields in Qlik Sense by using of mapping table

Thanks a lot in advance

Beck

1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

Try this :

map:

mapping load * inline [

name, NewName

omar, OBS

];

table:

load id, ApplyMap('map',oldName,oldName) as NewName Inline [

id, oldName

1, omar

2, beck

]

;

result:

Capture.PNG

View solution in original post

10 Replies
Anonymous
Not applicable

Hi Beck,

You need to create a another Load statement to rename this using aliases.

complete your mapping and take resident of the fields you want and rename them.

Regards,

Rajan Kasbe

OmarBenSalem
Partner - Champion II
Partner - Champion II

Hi Beck, can you elaborate with a simple example?

Maybe 2 dimensions, 4 or 5 lines of values and what you want to change and how?

Thanks

beck_bakytbek
Master
Master
Author

Hi Omar,

i find this issue:http://www.learnallbi.com/renaming-fields-in-qlikview-using-mapping-load/

i wanted to recreate this example, but i didnt achieve the correct results

Thanks a lot

Beck

beck_bakytbek
Master
Master
Author

HI Rajan,

first of all thanks a lot for your responce, do you have any example to your above explanation.

Thanks a lot

Beck

OmarBenSalem
Partner - Champion II
Partner - Champion II

Try this :

map:

mapping load * inline [

name, NewName

omar, OBS

];

table:

load id, ApplyMap('map',oldName,oldName) as NewName Inline [

id, oldName

1, omar

2, beck

]

;

result:

Capture.PNG

beck_bakytbek
Master
Master
Author

Omar, thanks a lot,

on the base of above link to issue of renaming of fields: i didn't know, that the Function: ApplyMap () must be used. I thought, the renaming of fields is possible only with Mapping load without ApplyMap().

Or am i missing something?

Beck

OmarBenSalem
Partner - Champion II
Partner - Champion II

Mapping load table will contain the newName field .

You HAVE to use ApplyMap function to use the mapping load table.

beck_bakytbek
Master
Master
Author

Thanks a lot Omar

m_s
Partner - Creator II
Partner - Creator II

Hello Beck,

I tested the link you posted and it is working as expected in Qlik Sense (September 2017). I think you had a different issue if your fields were not renamed properly.

I executed the following script and it resulted in a table with fields "New Name A" and "New Name B":

LOAD * Inline

[a,b

abc,123

defg,456];

m_Fields:

MAPPING LOAD * Inline

[OldName,NewName

a,New Field A

b,New Field B

];

RENAME FIELDS using m_Fields;

Regards,

Mathias