Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manjunathaetta
Contributor

Pivot Concatenation

Hi,

Based on INPUT Data, I crated PIVOT.

But I need  the OUTPUT as updated in the image.

In OUPUT, NAME column should combine all the NAMES with , separator.

 

 

 

1 Solution

Accepted Solutions
manjunathaetta
Contributor
Author

Thanks for your reply. 

1.By using the data, I have created a pivot and I used Concat(Name, ',') in the name dimension. But I got an error as Invalid diemension.

2. I created a table and I wrote the code as below. But I got an invalid expression error.

T1:

LOAD
Software,
TYP1,
TYP2,
VERSION,
"DATE",
"MONTH",
NAME,
concat(NAME,',') 

3. Then I used as bleow, I got token error. 

T1:
LOAD
Software,
TYP1,
TYP2,
VERSION,
"DATE",
"MONTH",
NAME

FROM ******

T2:
Load
Concat(NAME,','),
Resident T1
GROUP BY"NAME";

Can you pls advise.

View solution in original post

2 Replies
Vegar
MVP

Try aggregating NAME using Concat()

Concat (NAME,',')

 

You can do this either in the chart or in the script (in script you need to remember to use group by) 

manjunathaetta
Contributor
Author

Thanks for your reply. 

1.By using the data, I have created a pivot and I used Concat(Name, ',') in the name dimension. But I got an error as Invalid diemension.

2. I created a table and I wrote the code as below. But I got an invalid expression error.

T1:

LOAD
Software,
TYP1,
TYP2,
VERSION,
"DATE",
"MONTH",
NAME,
concat(NAME,',') 

3. Then I used as bleow, I got token error. 

T1:
LOAD
Software,
TYP1,
TYP2,
VERSION,
"DATE",
"MONTH",
NAME

FROM ******

T2:
Load
Concat(NAME,','),
Resident T1
GROUP BY"NAME";

Can you pls advise.