# Incremental tag/counter tag

**URL:** <https://forum.inductiveautomation.com/t/incremental-tag-counter-tag/11472>\
**Category:** Ignition\
**Created:** [April 5, 2016, 9:24pm UTC](https://forum.inductiveautomation.com/t/incremental-tag-counter-tag/11472 "2016-04-05T21:24:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kash](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kash](https://forum.inductiveautomation.com/u/Kash)\
**Post date:** [April 5, 2016, 9:24pm UTC](https://forum.inductiveautomation.com/t/incremental-tag-counter-tag/11472/1 "2016-04-05T21:24:29Z")

</div>

I have a realtime OPC tag KWH\_TOTAL, which I am storing in a Historical Transaction Group at a rate of 5minutes.

Then I have created another SQL Query tag ‘KWH\_DAILY’ to look at the KWH\_TOTAL from my previously created Transaction Group (SELECT LAST(KWH\_TOTAL) FROM kwh\_table;).

Lastly, I subtract the two in a an expression tag called KWH ( KWH\_TOTAL - KWH\_DAILY).

Now this KWH expression tag, I want this to be an incremental tag, rather than JUST the difference between the two Tags? How do I make this tag (or whatever approach) to have the KWH only count up, based on the subtraction?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [April 15, 2016, 4:15pm UTC](https://forum.inductiveautomation.com/t/incremental-tag-counter-tag/11472/2 "2016-04-15T16:15:34Z")

</div>

I am not quite understanding what you want when you ask for this to be an incremental tag. (Coffee hasn’t kicked in yet.) Would you explain a bit further what you are after?
