#12 Rows to columns in Qlik Sense

Want to do the opposite of Crosstable() ? Take your row to columns

It the first time I'm posting about script. I've talked to many of you and it appears that a large number is interested in script, not only dataviz.

Let me know in the comments if it helps and what kind of scripting themes could be interesting.

❓ How To ❓
//copy paste in your load editor to test
SourceTable: Load TransID, Pick(Ceil(3*Rand1),'A','B','C') as Dim1,
Round(1000*Rand()*Rand()*Rand1) as Expression1;
Load Rand() as Rand1, recno() as TransID Autogenerate 1000;


Finaltable: // init of the table
load ' ' as init AutoGenerate 0;

// loop on dimension value
For each Value in FieldValueList('Dim1')
Join(Finaltable) Load TransID,
Expression1 as $(Value) // Create column
Resident SourceTable Where Dim1='$(Value)';
Next;
Drop table SourceTable; Drop field init;

DQC12.gif