Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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

View solution in original post

1 Reply
sunny_talwar

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

View solution in original post