Custom Naming with "Chart From Table" Macro
Asked by William Haase:

I am looking for a solution to fix the automatic naming when creating multiple charts with the Chart from Table macro. Due to the nature of the data table(Confiform Tableview--\>Pivot Table) in the marco fields the "label" column and "value" column are both using the same variable name so the automatic name is output as "Variable1-Variable1" ,"Variable2-Variable2", and so on for all the charts. Is there any solution to fix this?


Answers:
author: Stiltsoft support
body: Hi [@William Haase](/t5/user/viewprofilepage/user-id/4523899) ,

You may place the [Table Transformer](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-transformer-macro-42241552.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro between the Confiform Tableview and Pivot Table or Pivot Table and Chart from Table (as is more convenient for you) and rename the columns:

SELECT

T1.'Column 1' AS 'New Name for Column 1',

T1.'Column 2' AS 'New Name for Column 2',

T1.'Column 3' AS 'New Name for Column 3'

FROM T1

After the Table Transformer macro your table will have hew headers that will be used by the macros that are placed on top of this Table Transformer macro.

comments: author: William Haase
body: Hey [@Stiltsoft support](/t5/user/viewprofilepage/user-id/5062270) thanks for the response. I wanted to expand on the issue I'm seeing further. Attached is an example of the Result from the Macro. Due to the nature of the confiform configuration this is the way the labels and values need to be set up. I am looking to only show 'Column 1" once for related chart not twice

![Confiforms Chart from Table Macro.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327012iCEC9C0D8840A8B03/image-size/large?v=v2&px=999 "Confiforms Chart from Table Macro.PNG")


author: Stiltsoft support
body: Hi [@William Haase](/t5/user/viewprofilepage/user-id/4523899) ,

Not sure that we got the issue - maybe the source table (or manually created table with dummy data that has the same structure as your source table coming from the Confiforms) may help? Or maybe even not the Confiforms but what you get after the Pivot Table macro (what table you use to create your charts)?

If the question is how to build three separate charts based on the same table, you may reuse your source table several times with the help of the Table Excerpt/Table Excerpt Include macros, wrap each Include in the Chart from Table macro and create independent charts.


author: William Haase
body: Here is an example of the table, the output should be a completion percentage based on "complete" or "incomplete" under column 1,2,3

![Confiforms Chart from Table Macro2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327064iC1515D70FDF83EF7/image-size/large?v=v2&px=999 "Confiforms Chart from Table Macro2.PNG")


author: Stiltsoft support
body: Then the current behavior of the Chart from Table is a correct one: you are trying to create three different pies in the same macro, so it simply draws what columns are matched between each other. As each column is taken twice (both for the groups of statuses and for the number of statuses in each group), you have a double name for each chart.

The workaround may be as I've mentioned before: reuse your source table twice (you'll have three tables) and wrap each table in the separate Chart from Table macro. Then you build three separate pies for each column.

There will be no any automatically generated chart name. So, you go to the "Look" tab of the macro settings and navigate to the Chart Title section. Here you'll be able to name your chart as you wish.

To place all three charts at the same level on the page, you may use the standard Section/Column macros.


author: William Haase
body: The work-around worked great, thank you for the help!!


Tags: chart

chart-from-table

confiforms

confluence-data-center

data-center

filter

table

table-filter

table-filter-and-charts

table-filter-charts-spreadsheets

table-transformer