# How to Add Pie Chart to Report Table under Groupings

**URL:** <https://forum.inductiveautomation.com/t/how-to-add-pie-chart-to-report-table-under-groupings/75472>\
**Category:** Ignition\
**Created:** [June 23, 2023, 6:39pm UTC](https://forum.inductiveautomation.com/t/how-to-add-pie-chart-to-report-table-under-groupings/75472 "2023-06-23T18:39:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl\_Jensen](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@Earl\_Jensen](https://forum.inductiveautomation.com/u/Earl_Jensen)\
**Post date:** [June 23, 2023, 6:39pm UTC](https://forum.inductiveautomation.com/t/how-to-add-pie-chart-to-report-table-under-groupings/75472/1 "2023-06-23T18:39:23Z")

</div>

I have a report generated using a Dataset of stats from machine lines & operations. This info is generated and displayed in Table. I'm looking to add a Pie Chart to certain parts of that table.

Here is an example section of some of the data in the Data Key on the table:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/a/5aab4f9ac80c5ddf1cb11152b2dd2da7f25f038f.png)

On the report, there's a single table that groups by the Line Name and then outputs various info about each OP. Here's a picture of the Table Grouping as well as a snippet of what that report Preview looks like:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73443280159766a3f7b307b50a83047a76b1ec59.png)

Preview Report:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/204b8453c657f9a92b52de3150c7e6d9f35006c9.png)

This is great, **but** the next thing I'm trying to do is:

1. Use a custom Version Key to identify certain OPs, that we want to show more info for.  
This part is done and I can now identify and change the format on certain OPs. Here shows how B1 OP is identifed and sized differently:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b66ce8eb67bc830189424eeaef4e825c93e427b.png)

**Problem/Need**  
2) I want to put a Pie Chart inside this '08 - B1' section that has Keys 'Discharge' and 'Spoilage' found in the Data Key / Dataset header, then the values of that Pie Chart are the values inside the row in those respective columns.

I can't seem to figure out how to make this work. I think Pie Charts want to use a column as a Key and another column as Values, but I want to use my column names as Keys, then use the values in the row for that OP to be the values in the pie chart.

Hopefully that makes sense!

---

<div class="post-metadata">

**Author:** ![Earl\_Jensen](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@Earl\_Jensen](https://forum.inductiveautomation.com/u/Earl_Jensen)\
**Post date:** [June 23, 2023, 6:53pm UTC](https://forum.inductiveautomation.com/t/how-to-add-pie-chart-to-report-table-under-groupings/75472/2 "2023-06-23T18:53:52Z")

</div>

OK...I may have jumped the gun here...or something hit me when I hit send.

**Solution**  
Create a new Dataset that fits the Pie Graph key/value requirements, and then attach that DS to the end of the large Dataset / Data Key being fed into the table.

At that point, I just pointed to that Dataset within the dataset....

Thanks anyway!
