Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell
Partner - Creator
Partner - Creator

Changing Dimension Value in LoadScript

I have a dimension called [System ID] which has a value of 1 to 15. Each of those numerical values actually represent a unique system and I'd like the dimension to display the name instead of the ID. In SQL Server I only have the ID not Name. Is there a way in the LoadScript, or otherwise, to change the value of each? For example, when [Record ID] = '1' change it to 'System Name 01'. 

Thanks for any suggestions!

Labels (1)
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

If you know the names you can create an inline table in the script to create a new table that you can use as the dimension that will understand the data from the perspective of each system. Another solution would be to use a mapping table to bring that name into the other table.

The code to create an inline table would be:

SystemNames:
Load * inline [
System ID, System Name
1, System Name 01
2, System Name 02
.
.
.
12, System Name 12
];

 

View solution in original post

1 Reply
Lisa_P
Employee
Employee

If you know the names you can create an inline table in the script to create a new table that you can use as the dimension that will understand the data from the perspective of each system. Another solution would be to use a mapping table to bring that name into the other table.

The code to create an inline table would be:

SystemNames:
Load * inline [
System ID, System Name
1, System Name 01
2, System Name 02
.
.
.
12, System Name 12
];