cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation view concatenate

0 Kudos

I would like to create a concatenation in a calculation view.

For example,

if I have several rows like...

PLANT | CUSTOMER | LABEL

1 | 1 | A

2 | 1 | A

3 | 1 | B

I would like to create a aggregation / projection with this grouping

CUSTOMER | LABEL

1 | AB

Is that possible?

Thanks and regareds.

Accepted Solutions (0)

Answers (1)

Answers (1)

venkateswaran_k
Active Contributor
0 Kudos

Hi

Try this way

Example code

SELECT A.CUSTOMER  AS "CUSTOMER" , STRING_AGG(LABEL,',' ORDER BY CUSTOMER) AS "LABEL" 
 FROM
    <TABLENAME> AS A
 GROUP BY A.CUSTOMER;

This is kind of Transpose option

1. LABEL - is the column you are transposing

2. Order by clause - can be your any column in that table - I used customer itself. (example plant you can use)

Hope this help you

venkateswaran_k
Active Contributor
0 Kudos

Hi jose,

did you try this?

venkateswaran_k
Active Contributor
0 Kudos

Hi

Is your question resolved?

Regards,

Venkat