# How to make a totalizer?

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-a-totalizer/52935>\
**Category:** Ignition\
**Created:** [November 10, 2021, 7:11pm UTC](https://forum.inductiveautomation.com/t/how-to-make-a-totalizer/52935 "2021-11-10T19:11:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 10, 2021, 8:03pm UTC](https://forum.inductiveautomation.com/t/how-to-make-a-totalizer/52935/4 "2021-11-10T20:03:19Z")

</div>

A better solution would be to store your values in a database, then use the database to do your calculations. A couple of blasts from the past:

> [@Creating a tag that records a cumulative total of parts being made in a shift, storing it at the end of the shift and then resetting it to 0](https://forum.inductiveautomation.com/t/creating-a-tag-that-records-a-cumulative-total-of-parts-being-made-in-a-shift-storing-it-at-the-end-of-the-shift-and-then-resetting-it-to-0/50521/2):
>
> Store each box weight in the database. You can then query the database for total production, or production on one side or the other, what time each box is completed, etc.

> [@Logging flow totals](https://forum.inductiveautomation.com/t/logging-flow-totals/9525/2):
>
> Personally, I’d go with a transaction group. That way, if you happen to lose connection to the database, the Store and Forward engine will hold the entries for you until it restored. Just my 51-cent’s worth (adjusting for inflation). wink

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-make-a-totalizer/52935)._
