Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
runelle
Contributor
Contributor

Dynamic Rename Column on the basis of Mapping

Hi Everyone ,

I stuck in the requirement for these tables in Qliksense ,looking for your suggestion

Table beta  have list of data for different column but the name of this data column should assign on the basis of the Name present in Table meta i.e. EHYBASPOP should be changed as Total Population and EYHBASHHD as Total Households etc.

If the name of EHYBASPOP is change as XXX in Table meta  ,then it should automatically changed in the output table

 

  Table beta :

 

CODE GEO EHYBASPOP EHYBASHHD EHYBASHPOP EHYBAS12P EHYBAS15P EHYBAS18P EHYBAS19P
A0A1A0 FSAQ421 20 30 25 35 55 62 85
M1G3H4 FSALDU 50 56 20 25 47 75 78
M1G3K4 FSALDU 70 78 30 10 85 42 45
M3H5Y7 FSALDU 60 94 10 45 65 41 43

 

 

  Table meta :

Variable Description
CODE CODE
GEO GEO
EHYBASPOP Total Population
EHYBASHHD Total Households
EHYBASHPOP Total Household Population
EHYBAS12P Total Population 12 Year Or Over
EHYBAS15P Total Population 15 Years Or Over
EHYBAS18P Total Population 18 Years Or Over
EHYBAS19P Total Population 19 Years Or Over

 

Required output

 

CODE GEO Total Population Total Households Total Household Population Total Population 12 Year Or Over Total Population 15 Years Or Over Total Population 18 Years Or Over Total Population 19 Years Or Over
A0A1A0 FSAQ421 20 30 25 35 55 62 85
M1G3H4 FSALDU 50 56 20 25 47 75 78
M1G3K4 FSALDU 70 78 30 10 85 42 45
M3H5Y7 FSALDU 60 94 10 45 65 41 43
Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

It's just:

m: mapping load Variable, Description from Meta;

rename fields using m;

Beside this it might be more suitable to transform the crosstable into a normal data-structure and and using then Meta as an associated table or the description information is joined/mapped to this table:

The Crosstable Load - Qlik Community - 1468083

View solution in original post

4 Replies
Or
MVP
MVP

As in the older thread you replied to, this looks like a standard case of Rename Fields using [table]. The syntax is identical for QlikView and Qlik Sense, I believe.

https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularSt...

runelle
Contributor
Contributor
Author

Hi,

 

Sorry I am still a bit confused. So you are saying that I need to upload both the meta and beta tables in Qliksense  as it is and then use the syntax of rename fields?

 

Rename Fields (using mapname | oldname to newname{ , oldname to newname })

in this case what table would be mapname, oldname and newname?

 

Sorry i'm a beginner and really confused. If you can elaborate it would be super helpful.

marcus_sommer

It's just:

m: mapping load Variable, Description from Meta;

rename fields using m;

Beside this it might be more suitable to transform the crosstable into a normal data-structure and and using then Meta as an associated table or the description information is joined/mapped to this table:

The Crosstable Load - Qlik Community - 1468083

runelle
Contributor
Contributor
Author

Thank you so much 😀