# Can I sum a columns value in a table with the reporting module

**URL:** <https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025>\
**Category:** Ignition\
**Created:** [July 6, 2023, 8:29pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025 "2023-07-06T20:29:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [July 6, 2023, 8:29pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025/1 "2023-07-06T20:29:00Z")

</div>

I have a report that is using a SQL query and a nested query to populate a table. Is there a way to sum a columns value of the table in the Reporting Module? I know you can @value\*5@ but that is for each value returned for that column in the query. Was hoping to possibly use something like @SUM(value)@ in the footer of the table to show a columns total value. Not that easy i guess. Any suggestions?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 6, 2023, 8:44pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025/2 "2023-07-06T20:44:20Z")

</div>

Yes. Use the Summary Row in conjunction with the Calculation Keys

Manual page for calculation keys:  
[https://docs.inductiveautomation.com/display/DOC81/Data+Keys#DataKeys-ShowCalculationsProperty](https://docs.inductiveautomation.com/display/DOC81/Data+Keys#DataKeys-ShowCalculationsProperty)

Manual page showing an example:  
[https://docs.inductiveautomation.com/display/DOC81/Table+Rows](https://docs.inductiveautomation.com/display/DOC81/Table+Rows)

IU Video on Table Rows:

> **[Table Rows Video at Inductive University](https://inductiveuniversity.com/videos/table-rows/8.0/8.1)**
>
> This lesson examines the Row object on the Reporting Module's Table component.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [July 6, 2023, 8:45pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025/3 "2023-07-06T20:45:01Z")

</div>

This is the first time ive seen the keychain docs, looks really useful.

> [@Report table sum of rows (based on page)](https://forum.inductiveautomation.com/t/report-table-sum-of-rows-based-on-page/12416/2):
>
> You can definitely get the number of rows displayed so far with @Running.count@, but I don’t see a way to do the number of rows just on that page, ignoring previous pages. Maybe if you get creative with assignments? In the key browser with “Show Calculations” checked we only give you the most common keychain calculations. You can get the full range of possibilities and examples by going to the [keychain docs](http://www.reportmill.com/support/keychains.pdf).

Something like this in a summary row:  
`@total.value@`

---

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [July 6, 2023, 8:56pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025/4 "2023-07-06T20:56:51Z")

</div>

Thank you very much for the help!!! That worked. I didnt know there were so many options.

---

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [August 1, 2023, 3:58pm UTC](https://forum.inductiveautomation.com/t/can-i-sum-a-columns-value-in-a-table-with-the-reporting-module/76025/5 "2023-08-01T15:58:39Z")

</div>

Another question on the reporting module. Can you perform date arithmetic in the reporting module? For instance i have one column that has an entry date and time and another column with an exit date and time. Could i populate a third row showing the difference of these two time stamps? I would do it in the sql query but the table format is not allowing me to do this.
