Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Build Column from variables in Load script

Hi, 

 

Does somebody know, how to build column in a table from variables 

i have $(var1), $(var2), $(var3)

My desired output should be table with column like:

Col1: 

var1,

var2

var3

 

Thanks 

1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

OK, thank you all but i found it at first i generate dummy table with auto generate based on count how many non empty variables ,  then i used CROSSTABLE to get the result and just uncut the unneeded fileds, quite a funny solution but it works,  i will post later code

View solution in original post

6 Replies
Highlighted

Does these variables have multiple values or just single value? If they have multiple values, how are you creating these variables in the first place?

Highlighted

can you explain little bit more??

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Contributor III
Contributor III

Hi, only single value ( like some names of operations 'Service', 'Main',  etc.)

Highlighted

Just do this

Col1:
LOAD '$(var1)' as var1,
     '$(var2)' as var2,
     '$(var3)' as var3
AutoGenerate 1;
Highlighted
Contributor III
Contributor III

actually it's generate not a column but one row

 var1var2var3

, but i need it as a column in one table 

Col1
 var1
var2
var3

 

 

Highlighted
Contributor III
Contributor III

OK, thank you all but i found it at first i generate dummy table with auto generate based on count how many non empty variables ,  then i used CROSSTABLE to get the result and just uncut the unneeded fileds, quite a funny solution but it works,  i will post later code

View solution in original post