Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Alias Table

Hi,

 

I am aware of the alias function: alias fieldname as aliasname

 

But how can I use it in combined with a Excel table where my two names are included, is this possible in Qlik Sense?

 

I want to have the renaming in an Excel and use the alias function in the script. 

 

Please advise.

Labels (1)
2 Replies
marcus_sommer

You could do it per mapping, like: Rename field | Qlik Cloud Help

FieldMap: Mapping SQL SELECT oldnames, newnames from datadictionary;

Rename Fields using FieldMap;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you can use RENAME, use the map as @marcus_sommer suggests. If you require ALIAS, you can do something like this. Replace the "LOAD * Inline" with your excel load.

AliasNames:
Load
Concat('[' & from & '] as [' & to & ']', ', ') as AliasStatement
;
LOAD * Inline [
from, to
Cust, Customer
Addr, Address
Amount, Transaction Amount
]
;
Let vAliasStateement = Fieldvalue('AliasStatement', 1);
Alias $(vAliasStateement);

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com