Stiltsoft macro: Combine three tables into one with content on one row only
Asked by Bj?rn Tenn?e:

I have used the [Table Transformer macro](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro "Follow link") by Stiltsoft to combine three tables into one, see screen shot. But the content comes on three rows, which is undesirable for my purposes. I need the three rows to be combined into one for this to be useful to me. The reason is that the table is supposed to be used in a bigger report table on a parent page.

The macro accepts SQL for transformation purposes. But I don't know enough SQL to perform the desired transformation. Is it possible? Does anyone have working code? Any help would be greatly appreciated.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/120006iF8664A89C4CB65DA/image-dimensions/562x215?v=v2 "image.png")


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Bj?rn Tenn?e](/t5/user/viewprofilepage/user-id/681454) ,

The Table Transformer macro can lookup as many tables as you need by the default [Lookup preset](https://docs.stiltsoft.com/display/public/TFAC/Default+automatic+presets#Defaultautomaticpresets-Lookuptablespreset), but you need a column with unique data (for example, issue keys, employees' names, etc.) to match the corresponding cells into the same rows.

![Mon 1-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/120009i1E12AA744F5A29CE/image-size/large?v=v2&px=999 "Mon 1-1.png")![Mon 1-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/120010i5865A5E678A36471/image-size/large?v=v2&px=999 "Mon 1-2.png")![Mon 1-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/120011i6A34DFC25DC8D758/image-size/large?v=v2&px=999 "Mon 1-3.png")As you can see, here I combine my result report from three separate tables (manually created or reused with the help of the Table Excerpt/Table Excerpt Include macros - it doesn't matter) and use the Project column with unique project names for the lookup feature.

Maybe you can provide the screenshots of your original tables? Because I see that criteria, phase, status and summary are the description of something (projects? products? issues?) and we need to match them by this 'something'.

P.S. If you want to merge your tables by the table headers, just choose the default Merge preset:

![Mon 1-4.png](https://community.atlassian.com/t5/image/serverpage/image-id/120013i4872975E801F81E4/image-size/large?v=v2&px=999 "Mon 1-4.png")![Mon 1-5.png](https://community.atlassian.com/t5/image/serverpage/image-id/120014i663BE2D558B263D4/image-size/large?v=v2&px=999 "Mon 1-5.png")![Mon 1-6.png](https://community.atlassian.com/t5/image/serverpage/image-id/120015iE00D1A71C685F0A6/image-size/large?v=v2&px=999 "Mon 1-6.png")

comments: author: Bj?rn Tenn?e
body: Hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746), thank you for your swift, thoughtful and useful reply. I did as you said and added a column with dummy data. I gave it the name "__" (two underscores; for some reason, one underscore didn't work). While it looks a little bit weird for passers-by, I think we can live with it :-) Again thanks!


author: Katerina Kovriga {Stiltsoft}
body: [@Bj?rn Tenn?e](/t5/user/viewprofilepage/user-id/681454) , you may hide your additional column with the help of the Table Filter macro.

Wrap your Table Transformer macro in the Table Filter macro body:

![Tue 1-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/120113i405BF1CA037FDD06/image-size/large?v=v2&px=999 "Tue 1-1.png")And check the **Hide columns** box into the **Filters** tab:

![Tue 1-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/120114i43926EA426333835/image-size/large?v=v2&px=999 "Tue 1-2.png")Then go to the **Filtration** tab -\> **Set filters' default values** section and choose what columns you want to hide:

![Tue 1-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/120115iFCCAC927F22F5DE1/image-size/large?v=v2&px=999 "Tue 1-3.png")Hope this will help your case.


Tags: confluence-server

macro

server

stiltsoft

table