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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QlikView Column to Row Table

I've a data set in the following format


Data set

Response      question       answer

1                   1                  Name 1

1                   2                   Yes

2                   1                  Name 2

2                   2                   No

3                   1                  Name 3

3                   2                   Yes

I want to create a table as shown below - 

Response    Names          Yes / No

1                 Name 1          Yes

2                 Name 2          No

3                 Name 3          Yes

Can someone please help?

4 Replies
hic
Former Employee
Former Employee

You should use a Generic Load. See The Generic Load

HIC

Anonymous
Not applicable
Author

Thank you.

Is there another way to do this using functions.

petter
Partner - Champion III
Partner - Champion III

You could do it like this - but I guess it is much less efficient than doing a GENERIC LOAD - the benefit is that you get a single table immediately:

[Data set]:

LOAD * INLINE [

Response question answer

1 1 Name 1

1 2 Yes

2 1 Name 2

2 2 No

3 1 Name 3

3 2 Yes

] (delimiter is \t);

[Result Table 1]:

LOAD Response AS Response#,

  SubField( answer , '|' , 1 ) AS Names,

  SubField( answer , '|' , 2 ) AS [Yes / No];

LOAD

  Response,

  Concat( answer , '|' ) AS answer

RESIDENT

  [Data set]

GROUP BY

  Response;

DROP TABLE [Data set];

jolivares
Specialist
Specialist

Hi Henric, I beg your pardon to to try to get you by this way, but I have an unsolved issue depicted in this ticket.  I am not satisfied with the solution found it. 

May you please see this.  Thanks at all.

Re: How to get the correct Rowno