Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change row values into column headers in qlikview

Hi,

Please can any one help me how to solve this

EidEnameEdesignation
ANUCEO
1USHAMNGR
2KALYANIMNGR
3BHARGAVTM
4REDDYPL
5ASHOKMNGR
6VENKATTM
7ANILPL
8ASHAAS
9SIRIAS
10NYMIPL
11SWETM
12ANILAS
13NAIDUAS
14HARSHAMNGR

I WANT TO CHANGE ABOVE TABLE INTO BELOW SHOWN TABLE 

ECOMNGRTMPLAS
ANUUSHABHARGAVREDDYNAIDU
KALYANIVENKATANILANIL
ASHOKSWENYMISIRI
HARSHAASHA
1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_134116_Pic1.JPG.jpg

tabInput:

LOAD * INLINE [

    Eid, Ename, Edesignation

    , ANU, CEO

    1, USHA, MNGR

    2, KALYANI, MNGR

    3, BHARGAV, TM

    4, REDDY, PL

    5, ASHOK, MNGR

    6, VENKAT, TM

    7, ANIL, PL

    8, ASHA, AS

    9, SIRI, AS

    10, NYMI, PL

    11, SWE, TM

    12, ANIL, AS

    13, NAIDU, AS

    14, HARSHA, MNGR

];

tabOutput:

Generic LOAD

  AutoNumber(RecNo(), Edesignation) as ID,

  Edesignation,

  Ename

Resident tabInput;

DROP Table tabInput;

hope this helps

regards

Marco

View solution in original post

9 Replies
Anonymous
Not applicable
Author

with pivot chart you can move columns to rows and rows to columns

ychaitanya
Creator III
Creator III

Hope you can Use Aggr on EDesignation with other columns

Regards

Chaitanya

dinuwanbr
Creator III
Creator III

Hi,

To achieve this easily in script level you can do a generic load.

follow following document for that.

http://community.qlik.com/blogs/qlikviewdesignblog/2014/03/31/generic

BR,

Dinu1

anbu1984
Master III
Master III

Load 1 as key ,RowNo() as RowNo, Edesignation & ' ' & Concat(Ename,' ') As Res Group by Edesignation;

lOAD * Inline [

Eid,Ename,Edesignation

,ANU,CEO

1,USHA,MNGR,

2,KALYANI,MNGR,

3,BHARGAV,TM,

4,REDDY,PL,

5,ASHOK,MNGR,

6,VENKAT,TM,

7,ANIL,PL,

8,ASHA,AS,

9,SIRI,AS,

10,NYMI,PL,

11,SWE,TM,

12,ANIL,AS,

13,NAIDU,AS,

14,HARSHA,MNGR ];

NoConcatenate

Final:

Load SubField(SubField(Txt,'|',1),' ',IterNo()) As Col1, SubField(SubField(Txt,'|',2),' ',IterNo()) As Col2,

SubField(SubField(Txt,'|',3),' ',IterNo()) As Col3,

SubField(SubField(Txt,'|',4),' ',IterNo()) As Col4,

SubField(SubField(Txt,'|',5),' ',IterNo()) As Col5

While IterNo() <= RangeMax(SubStringCount(SubField(Txt,'|',1),' '),SubStringCount(SubField(Txt,'|',2),' '),SubStringCount(SubField(Txt,'|',3),' '),SubStringCount(SubField(Txt,'|',4),' ')

,SubStringCount(SubField(Txt,'|',5),' ')) + 1;

Load Concat(Res,'|',RowNo) As Txt Resident Initial Group by key order by RowNo;

Not applicable
Author

in generic load  can't get exact result

Not applicable
Author

thankyou Anbu cheliyan but ur solution is not helping to me .

Please check the requirement what i am posted . i want  edesignation field values converted into fieldnames

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_134116_Pic1.JPG.jpg

tabInput:

LOAD * INLINE [

    Eid, Ename, Edesignation

    , ANU, CEO

    1, USHA, MNGR

    2, KALYANI, MNGR

    3, BHARGAV, TM

    4, REDDY, PL

    5, ASHOK, MNGR

    6, VENKAT, TM

    7, ANIL, PL

    8, ASHA, AS

    9, SIRI, AS

    10, NYMI, PL

    11, SWE, TM

    12, ANIL, AS

    13, NAIDU, AS

    14, HARSHA, MNGR

];

tabOutput:

Generic LOAD

  AutoNumber(RecNo(), Edesignation) as ID,

  Edesignation,

  Ename

Resident tabInput;

DROP Table tabInput;

hope this helps

regards

Marco

Not applicable
Author

Thankyou very much Marco Wedel for ur help.

MarcoWedel

you're welcome.

please close this thread if there are no further questions.

thanks

regards

Marco