# Mean of a column, used as the footer

**URL:** <https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [May 13, 2024, 5:37pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322 "2024-05-13T17:37:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Smith1](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Luke\_Smith1](https://forum.inductiveautomation.com/u/Luke_Smith1)\
**Post date:** [May 13, 2024, 5:37pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/1 "2024-05-13T17:37:21Z")

</div>

Hi everyone,

I am trying to show the mean of m columns in a table in the footer of each column. I used to format shown in [mean](https://docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/aggregates/mean) but it is not working correctly. I am using an expression binding to "title" in the footer section of props.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8ef8aaf7d05ffd106ff93f29796a42639f62aeed.png)

```python
mean({this.props.data}, 'CycleTime')

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 13, 2024, 5:43pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/2 "2024-05-13T17:43:54Z")

</div>

Is the source data for your table in dataset format? (That syntax for `mean()` requires it.)

---

<div class="post-metadata">

**Author:** ![Luke\_Smith1](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Luke\_Smith1](https://forum.inductiveautomation.com/u/Luke_Smith1)\
**Post date:** [May 13, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/3 "2024-05-13T17:45:29Z")

</div>

its a query.. return format is dataset.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 13, 2024, 6:10pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/4 "2024-05-13T18:10:27Z")

</div>

If you hover over the "Error\_ExpressionEval" at the bottom, what does it show?

---

<div class="post-metadata">

**Author:** ![Luke\_Smith1](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Luke\_Smith1](https://forum.inductiveautomation.com/u/Luke_Smith1)\
**Post date:** [May 13, 2024, 6:26pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/5 "2024-05-13T18:26:11Z")

</div>

"Mean should only be called with one array argument"

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [May 13, 2024, 7:12pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/6 "2024-05-13T19:12:47Z")

</div>

Does the props.data come from another custom property or is it bound at that level?

Maybe try creating a custom property on the view and making sure that is set for dataset, and the bind the table to that custom property. Then try the mean on that custom property.

---

<div class="post-metadata">

**Author:** ![Luke\_Smith1](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Luke\_Smith1](https://forum.inductiveautomation.com/u/Luke_Smith1)\
**Post date:** [May 13, 2024, 7:17pm UTC](https://forum.inductiveautomation.com/t/mean-of-a-column-used-as-the-footer/90322/7 "2024-05-13T19:17:58Z")

</div>

That test immediately identified the issue, thanks @bschroeder. My data has a transform that adds a background color style to each object.

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