Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
annalisa_carado
Partner - Contributor II
Partner - Contributor II

for each in script

Hi all, I have a question about this situation:

I have this table :

   

KeyMeasureAMeasureBMeasureC
AAAAA1020

30

and I want a final table like this:

  

KeyMeasure  Value
AAAMeasureA10
AAAMeasureB20
AAAMeasureC30

I wrote the static solution:

TMP:

load

Key,

'MeasureA' as Measure,

MeasureA as Value

resident MyTable;

Concatenate

load

Key,

'MeasureB' as Measure,

MeasureB as Value

resident MyTable

.....

I would like to get this dinamyc (maybe in future will have new dimensions), using for each next .. but i'm not having success.

Any help?

2 Replies
Anonymous
Not applicable

Try cross table Annalisa.

crosstable(measure,Value,1)

Load * from <your initial table>;

MK_QSL
MVP
MVP

CrossTable (Measure, Value)
Load

     Key,

MeasureA,

MeasureB,

MeasureC

From TableName;