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,293,829
Community Members
 
Community Events
165
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

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
Community showcase
Published in Confluence Cloud

Presenter Mode for Confluence is here 🖥 👩‍💻

👋  Hello Community!  My name is Stephanie Zhang, and I’m a product manager on the Confluence cloud team. Today, I’m excited to announce the rollout of  Presenter Mode : a ...

79,909 views 126 302
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you