# Historical pie chart

**URL:** <https://forum.inductiveautomation.com/t/historical-pie-chart/19160>\
**Category:** Ignition\
**Created:** [August 9, 2018, 1:16am UTC](https://forum.inductiveautomation.com/t/historical-pie-chart/19160 "2018-08-09T01:16:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott.Hann](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/scott.hann/32/4873_2.png) [@Scott.Hann](https://forum.inductiveautomation.com/u/Scott.Hann)\
**Post date:** [August 9, 2018, 1:16am UTC](https://forum.inductiveautomation.com/t/historical-pie-chart/19160/1 "2018-08-09T01:16:44Z")

</div>

I’m trying to compare the power consumption over a region of time for two different areas. I’ve set each tag to log to historian, and bound the Data property of the pie chart to Tag History of the two tags. So, it turns out the largest percentage of the power usage is t\_stamp, the number of milliseconds from 1970.  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/737cd0e7986b5d1f52a3a80c96db16ed073f7212.png)

In attempt 2, I custom created a property of the pie chart that makes the 3 column dataset, and attempted to create an expression that sums the 2 relevant columns and uses those values for the pie chart, however I was unsuccessful. What is the best way to approach this problem in ignition?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 9, 2018, 3:17pm UTC](https://forum.inductiveautomation.com/t/historical-pie-chart/19160/2 "2018-08-09T15:17:32Z")

</div>

1. Add a custom property (type dataset) and copy your historical binding to it
2. Change the binding on the pie chart’s data property to an expression using [`columnRearrange`](https://docs.inductiveautomation.com/display/DOC79/columnRearrange) - a somewhat misleading name, it can also be used to _filter_ columns from a dataset, with something like this:  
`columnRearrange({Root Container.Pie Chart.Custom Property}, "tag1", "tag2")`
