Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Transform table

hi,

please look at my app. There you can see is a Inline table called "Erstes Spiel" and a table called "Spiel". I want to transform  the Inline Table "Erstes Spiel"

into "Spiel". I think I have to work with a loop cluase. Can anyone give my example to build this...

Thank you

1 Solution

Accepted Solutions

Re: Transform table

Try this:

ErstesSpiel:

LOAD * INLINE [

    SpielsID, Home, Away, Result

    1, A, B, 2:0

    2, C, D, 3:4

];

Temp:

CrossTable(Column, Team, 2)

LOAD SpielsID,

  Result,

  Home,

  Away

Resident ErstesSpiel;

Spiel:

LOAD SpielsID,

  Team,

  If(SpielsID = Previous(SpielsID), SubField(Result, ':', 2), SubField(Result, ':', 1)) as Result

Resident Temp;

DROP Table ErstesSpiel, Temp;


Capture.PNG

1 Reply

Re: Transform table

Try this:

ErstesSpiel:

LOAD * INLINE [

    SpielsID, Home, Away, Result

    1, A, B, 2:0

    2, C, D, 3:4

];

Temp:

CrossTable(Column, Team, 2)

LOAD SpielsID,

  Result,

  Home,

  Away

Resident ErstesSpiel;

Spiel:

LOAD SpielsID,

  Team,

  If(SpielsID = Previous(SpielsID), SubField(Result, ':', 2), SubField(Result, ':', 1)) as Result

Resident Temp;

DROP Table ErstesSpiel, Temp;


Capture.PNG

Community Browser