Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table transfomation

Hey,

I have created a little inline table with dates and typs. I know that this example make not really sense but I have a question about this. So what I am trying to do is the following...

This is the Inline table:

table:

LOAD * INLINE [

    Date, Typ

    1.1.2015, A

    2.1.2015, A

    1.1.2015, B

    2.1.2015, B

];

And now I want to transform the table into this table...

Typ / Key

A  / 1.1.2015_2.1.2015_A

B / 1.1.2015_2.1.2015_B

How I can do it?

3 Replies
swuehl
MVP
MVP

Maybe like

table:

LOAD * INLINE [

    Date, Typ

    1.1.2015, A

    2.1.2015, A

    1.1.2015, B

    2.1.2015, B

];

LOAD Typ, Concat(Date,'_') &'_'&Typ as Key

Resident table

GROUP BY Typ;

swuehl
MVP
MVP

Or if you want to show extrema:

table:

LOAD * INLINE [

    Date, Typ

    1.1.2015, A

    2.1.2015, A

    1.1.2015, B

    2.1.2015, B

];

LOAD Typ, Date(Min(Date),'D.M.YYYY') &'_'&Date(Max(Date),'D.M.YYYY') &'_'&Typ as Key

Resident table

GROUP BY Typ;

sunny_talwar

May be this:

Table:

LOAD * INLINE [

    Date, Typ

    1.1.2015, A

    2.1.2015, A

    1.1.2015, B

    2.1.2015, B

];

NewTable:

NoConcatenate

LOAD Typ & ' / ' & Concat(Date, '_', RecNo()) & '_' & Typ as Date

Resident Table

Group By Typ;

DROP Table Table;