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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 _neusta portal services_ ,

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 Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

259 views 6 18
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