Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,986
Community Members
 
Community Events
176
Community Groups

Table Transformer - concatenate data from multiple rows based on criteria

Hi,

SQL functions in Table Transformer is limited that i'm having trouble concatenating/merging data from multiple rows.

 

Table

Project  | Remarks

P1   |  The quick brown

P1   |  Fox jumps

P2   |  Over the

P2   |  Lazy dog

 

I need it to produce the output below:

Project | Remarks

P1   | The quick brown Fox jumps

P2   | Over the Lazy dog

 

2 answers

1 accepted

2 votes
Answer accepted

Hi @Joel Tabares ,

It seems that's a duplicate question for this one.

Let me repeat the answer here:

There are two options to resolve your case: the Table Transformer macro and the Pivot Table macro.

1.png

Option 1. Table Transformer

Use the following custom SQL query: SELECT T1.'Project', SUM(T1.'Remarks' + " ") AS 'Remarks' FROM T1 GROUP BY T1.'Project'

2.png3.png

Option 2. Pivot Table

Recreate the settings from the screenshots below:

4.png5.png

0 votes

Hi Joel,

 

if you could add an ID to your source table, like this

 

ID | Project | Remarks

1   | P1   |  The quick brown

2   | P1   |  Fox jumps

3   | P2   |  Over the

4   | P2   |  Lazy dog

It works with this sql.

SELECT concat (a.'Remarks'," ", b.'Remarks') FROM T1 a, T1 b where a.'Project'=b.'Project' and a.'ID'<b.'ID'

 

Usually I would use the rownum instead of the ID in SQL, but that didn't work for me in the table transformer.

Hi @Bastian Stehmann ,

ROWNUM() function returns the current row number. You can try to use it instead of the ID column.

Like # people like this

Ah, great, thank you very much.

Thank you all. Yes it was a duplicate question. I accidentally created the first one under the product Jira and couldn't delete it so i created the same question under Confluence.  I have what i need now. Thanks again!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events