Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
annalisa_carado
Partner
Partner

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
laddu_927
Specialist
Specialist

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;