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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
santhosh_k_n
Creator II
Creator II

Need to make value of a table to column name

Hi all,

Is it possible to make a value in one of the column to make as column name.

for ex:

I am having two columns as shown below

Repot genname
Gen1R1
Gen1R2
Gen1R3
Gen1R4
Gen1R5
Gen2R6
Gen2R7
Gen2R8
Gen2R9

Now i need to present above two columns as

Gen1Gen2
R1R6
R2R7
R3R8
R4R9
R5

Please suggest

3 Replies
jsingh71
Partner - Specialist
Partner - Specialist

Hi Santosh,

Please find attachment hope this will fulfill your need.

er_mohit
Master II
Master II

See the attached file

maxgro
MVP
MVP

REPORT:

load *, if(peek(gen)<>gen, 1, 1+peek(id)) as id;

load * inline [

gen, name

Gen1, R1

Gen1, R2

Gen1, R3

Gen1, R4

Gen1, R5

Gen2, R6

Gen2, R7

Gen2, R8

Gen2, R9

];

TABLE:

load id, name as Gen1 Resident REPORT where gen='Gen1';

join (TABLE) load id, name as Gen2 Resident REPORT where gen='Gen2';