Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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?

Labels (1)
3 Replies
swuehl
Champion III
Champion III

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
Champion III
Champion III

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
MVP
MVP

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;