Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
swatireddy
Partner - Contributor
Partner - Contributor

Vertical data to horizontal format (Transpose of data)

Hi All,

I have data in the spreadsheet, 1st column should be considered as a dimension. Alongside's columns data should belong to the particular dimension.

 

Given Input:

Filedsdatadata1
nameabcbcd
lastnameab
DOB10-09-199316-06-1996
DesignationManagerdeveloper

 

Desired Output:

namelastnameDOBDesignation
abca10-09-1993Manager
bcdb16-06-1996developer

 

Thanks in advance 

8 Replies
Taoufiq_Zarra

from

Given Input in excel for example

Filedsdatadata1
nameabcbcd
lastnameab
DOB10-09-199316-06-1996
DesignationManagerdeveloper
   

then :

Sans titre.png

output :

Capture.JPG

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
swatimoku
Contributor II
Contributor II

Hi,

 

Require the solution for Qliksense. 

Thank you.

Taoufiq_Zarra

juste try to copy and paste the code and define the path to the data.

attached the Qliksense version

Capture.JPG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
eduardo_dimperio
Specialist II
Specialist II

Hi,

Maybe you can use crosstable.

 

crosstable (attribute field name, data field name [ , n ] ) ( loadstatement | selectstatement )

 

i.e

Crosstable (Month, Sales) LOAD * from ex1.csv;

swatireddy
Partner - Contributor
Partner - Contributor
Author

Hi,

Thanks for the solution.

If we are fetching the data from the source system(SQL) how it is possible.

Richerson
Contributor
Contributor

When you're configuring data in a Microsoft Excel worksheet, you may realize that the information you entered in rows makes better sense in columns or vice versa.

anushree1
Specialist II
Specialist II

Looks like the attached solution works only when the source is excel, is there any alternative solution for this issue?

eduardo_dimperio
Specialist II
Specialist II

First extract the data to create your aux table, after apply Crosstable  on it, I think that will be the  easier way