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

How to seperate data in a column and then transpose the table?

Hi,

I want to transpose the following data:

Site,     Risks

4001,    ABC,DEF,PQR

4002     ABD,STU,PQR

To following format:

Site     Risks

4001,    ABC,

4001,    DEF

4001,    PQR

4002     ABC

4002,    STU

4002,    PQR

Can anyone let me know how to achieve this?

2 Replies
ashfaq_haseeb
Champion III
Champion III

Hi

you can use subfield()

Have a look at attached file

Directory;

LOAD Site,

     Risks,

     SubField(Risks,',') as Risk1

FROM

[..\Desktop\test131.xlsx]

(ooxml, embedded labels, table is Sheet1);

Regards

ASHFAQ

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This will unpack the Risks field:

LOAD Site,

     SubField(Risks, ',') As Risks

FROM ....

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein