Need to Combine the information present in two different tables created by macros
Asked by Manish V:

Hi,

We have two tables on two different confluence pages (One on each),  
The requirement is to combine two columns from each table and show that in a third table in a different confluence page.  
Both the tables are created using a combination of "'Calendar-Insight-Count-Leaves' Macro", Table filter Macro and Pivot Table Macro.

So I had the following question-

* Can we use macros like "Table Excerpt Include" or any other macro to combine the information present in these two tables to show in a confluence page.  
  Eg: In the first table-  
  Column 1= Employees  
  Column 2= Number of Leaves

Second Table-  
Column 1= Employees  
Column 2= Location

The third table needs to pull the data to show the following-

Column 1= Number of leaves  
Column 2= Location  
Hence showing that how many leaves the employees at a particular location have taken.

Please let me know if any additional info is required.

Thank You!

Best Regards,  
Manish


Answers:
author: Andrey Khaneev _StiltSoft_
body: Hi Manish,

It will be possible to do in the upcoming version 5.0 of Table Filter and Charts app you are already using. The version should be released this week. I'll tell you how to do it then.

comments: author: Manish V
body: Hi Andrey,

Ok,  
Thank you very much.   
Will wait till the version is released. :)

Best Regards,  
Manish


author: Natalie Paramonova [Stiltsoft]
body: Hi Manish,

The new version 5.0 of [Table Filter and Charts](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) is available.

The steps to resolve your case are the following:

1. Wrap the source tables in the [Table Excerpt](https://docs.stiltsoft.com/pages/viewpage.action?pageId=17301667#HowtouseTableExcerptandTableExcerptIncludemacros-UsingtheTableExcerptMacro) macros.

![2019-03-29_12h10_34.png](https://community.atlassian.com/t5/image/serverpage/image-id/49942i920647E35441AFA2/image-dimensions/292x260?v=v2 "2019-03-29_12h10_34.png")![2019-03-29_12h10_04.png](https://community.atlassian.com/t5/image/serverpage/image-id/49943iBCFFB5D474D52A1C/image-dimensions/280x247?v=v2 "2019-03-29_12h10_04.png")

2. Insert the copies of the source tables on the page for aggregation using the [Table Excerpt Include](https://docs.stiltsoft.com/pages/viewpage.action?pageId=17301667#HowtouseTableExcerptandTableExcerptIncludemacros-UsingtheTableExcerptIncludeMacro) macro (you can select from multiple options of the excerpt sources: from the current page, specific page, child pages, by labels). The macro supports multi-excerpt.

![2019-03-29_12h22_38.png](https://community.atlassian.com/t5/image/serverpage/image-id/49946iD66C2D1D903AEA90/image-dimensions/428x266?v=v2 "2019-03-29_12h22_38.png")

3. Wrap the Table Excerpt Include macro with the [Table Transformer](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Table+Transformer+macro?src=contextnavpagetreemode) macro.

![2019-03-29_12h12_32.png](https://community.atlassian.com/t5/image/serverpage/image-id/49945i3C9A3BE946D6D650/image-dimensions/376x155?v=v2 "2019-03-29_12h12_32.png")

4. Select the [Lookup tables](https://docs.stiltsoft.com/display/TableFilter/Default+automatic+presets#Defaultautomaticpresets-Lookuptablespreset)preset in the Table Transformer macro to associate two tables.

![2019-03-29_12h14_08.png](https://community.atlassian.com/t5/image/serverpage/image-id/49947i195F6CA503AEE6FE/image-dimensions/485x284?v=v2 "2019-03-29_12h14_08.png")

You get the following table:

![2019-03-29_12h14_35.png](https://community.atlassian.com/t5/image/serverpage/image-id/49948iD45CE66E147A7CF6/image-dimensions/335x260?v=v2 "2019-03-29_12h14_35.png")

5. Wrap the table with the [Pivot Table](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Pivot+table+macro?src=contextnavpagetreemode) macro to calculate the number of leaves by location.

![2019-03-29_12h15_12.png](https://community.atlassian.com/t5/image/serverpage/image-id/49949iD04B9A4B2D4932E8/image-dimensions/406x405?v=v2 "2019-03-29_12h15_12.png")

Please let me know if it helps.


Tags: confluence-server

macro

server

table