Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

convert row in to column !!!

Hi All,

          I have a Qvd which contains some fields like:

         Response _id,

          Date,

        category ,

        Qid,

        Response

      i want to convert Response row data into column ,i tried with generic load getting ans but data model should not be correct by using generic

this my original data:

Response _id QidResponse
10011003
10011015
10011028
10011036

and i want convert  into

Response _id101101102103
10013586
10022789

   For More clarification see my attachment 

  can any one help me

please find attachment

17 Replies
Not applicable
Author

thank u but how u can got Horizontal bar in pivot table i did't found in presentation tab also

am geting vertical pivot table

can u help me pls

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In the Pivot table, grab the dimension you want to make horizontal until a blue arrow appears. Drag the arrow to the top of the Pivot table until it turns sideways. Release the mouse button. Done.

anbu1984
Master III
Master III

Do you mean horizontal scroll bar? If pivot table is not able to display all dimensions (Here Qid), then it automatically adds horizontal scroll bar

alexandros17
Partner - Champion III
Partner - Champion III

This is the script ypu need, it works, please let me know

AAA:

LOAD * Inline [

Response_id, Qid, Response

1001 ,100, 3

1001 ,101, 5

1001 ,102, 8

1001 ,103, 6];

FOR i = 1 to NoOfRows('AAA')

  LET id = Peek('Response_id', $(i)-1, 'AAA');

  LET qu = Peek('Qid', $(i)-1, 'AAA');

  Tmp_$(i):

  LOAD Response_id, Response as $(qu) Resident AAA Where Response_id = $(id) and Qid = $(qu);

NEXT

BBB:

NoConcatenate

LOAD Distinct Response_id Resident AAA;

FOR i = 1 to NoOfRows('AAA')

  Left Join (BBB)

  LOAD * Resident Tmp_$(i);

  DROP Table Tmp_$(i);

NEXT

DROP Table AAA;

Not applicable
Author

No no not horizontal scroll bar

see my attachment

when u r doing this that pivot table  will come in horizontal 

when am doing same thing it will come in vertical

anbu1984
Master III
Master III

Is this you were referring? You have to click on Qid and then drag and drop horizontally

Row to col.png

anbu1984
Master III
Master III

Anonymous
Not applicable
Author

Hi Pradip,

Your example it is what I need.

Please where exactly do I have to change to get exactly this display? I saw in you example and the tab "Presentation" looks the same for all.

Could you help me?

Thank you!