Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE:Rows to Data

Hi all,

i have data like below  in Database file

INPUT:

Employee Table:

ExmName   EmpId     Location

AA       101          BANGLORE

AA       101          MUMBAI

AA        101         CHENNAI

BB    102     BANGLORE

CC    103    CHENNAI

CC    103    HYD 

DESIRED OUTPUT:

ExmName   EmpId     Location

AA       101          BANGLORE,MUMBAI,CHENNAI

BB     102     BANGLORE

CC    103      CHENNAI,HYD

how can i achieve this?

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a straight table with ExmName and EmpId as dimensions and as expression concat(Location, ',')

Or if you want to do it in the script:

Result:

LOAD ExmName, EmpId, concat(Location, ',') as Locations

RESIDENT INPUT

GROUP BY ExmName, EmpId;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a straight table with ExmName and EmpId as dimensions and as expression concat(Location, ',')

Or if you want to do it in the script:

Result:

LOAD ExmName, EmpId, concat(Location, ',') as Locations

RESIDENT INPUT

GROUP BY ExmName, EmpId;


talk is cheap, supply exceeds demand
Chanty4u
MVP
MVP
Author

Thanks .It works as expected