Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
aniketsr
Creator
Creator

Converting a single row to a column

Hi,

I have a scenario where the data is on the format below,

Qno213946102
1AYesYesYesYes
1BYesNOYesYes
1CYesNONOYes
1DYesNOYesYes

but we need to save the data in the Qvd in the below given format,

QnoSrNoAnswers
1A21Yes
1A39Yes
1A46Yes
1A102Yes
1B21Yes
1B39NO
1B46Yes
1B102Yes

Kindly help me wid the same

6 Replies
tresesco
MVP
MVP

Have a look at CROSSTABLE() functionality.

MayilVahanan

HI

Try like this

Crosstable(SrNo,Answers,2)

Load

*

From tablename;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

check attached file. I have used cross table.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this using Crosstable

 

CrossTable

(SrNo., Answer)
LOAD *
INLINE [
Qno, 21, 39, 46, 102
1A, Yes, Yes, Yes, Yes
1B, Yes, NO, Yes, Yes
1C, Yes, NO, NO, Yes
1D, Yes, NO, Yes, Yes
]
;

Regards,

Jagan.

MayilVahanan

HI


Try like this

CrossTable

(SrNo., Answer)

LOAD Qno,

     [21],

     [39],

     [46],

     [102]

FROM

Test.xlsx

(ooxml, embedded labels, table is Sheet1);

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

Hi,

PFA