# Keep only strictly positive samples of a historian Tag

**URL:** <https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [June 3, 2019, 12:14pm UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500 "2019-06-03T12:14:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagewaza1009](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nagewaza1009](https://forum.inductiveautomation.com/u/nagewaza1009)\
**Post date:** [June 3, 2019, 12:14pm UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/1 "2019-06-03T12:14:53Z")

</div>

Hello everyone,

I am currently trying to compute the average of a historian Tag but only when another (boolean) Tag is on value 1.  
To answer this problem, i thought about doing an Expression Tag which would keep my Tag’s value if boolean is 1 and be _null_ otherwise. Unfortunately, this seems to compute the average with _null_ values being considered as zeros.  
Is there a way to keep only strictly positive samples of a historian Tag (and more generally keep only certain samples of a historian Tag on a condition) ?

Thank you kindly for your help,

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [June 3, 2019, 1:51pm UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/2 "2019-06-03T13:51:33Z")

</div>

This sounds like you want to be using triggered transaction groups: [https://docs.inductiveautomation.com/pages/viewpage.action?pageId=6047036](https://docs.inductiveautomation.com/pages/viewpage.action?pageId=6047036)

---

<div class="post-metadata">

**Author:** ![nagewaza1009](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nagewaza1009](https://forum.inductiveautomation.com/u/nagewaza1009)\
**Post date:** [June 3, 2019, 2:50pm UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/3 "2019-06-03T14:50:02Z")

</div>

Thank you for your answer.

Transaction groups seem indeed the way to go ! Unfortunately, they do not appear in my Ignition Designer Window. I am running on Ignition 7.9.4. Does anyone know why ?

![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e9859995fa66cc1deb72617f27d7ca58aded5c36.png)

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [June 3, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/4 "2019-06-03T15:30:10Z")

</div>

Do you have the SQL Bridge Module?

---

<div class="post-metadata">

**Author:** ![nagewaza1009](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nagewaza1009](https://forum.inductiveautomation.com/u/nagewaza1009)\
**Post date:** [June 4, 2019, 7:31am UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/5 "2019-06-04T07:31:55Z")

</div>

SQL Bridge Module can’t be selected or activated on my Gateway as you can see on this picture :

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b276a2fc208ed322a676af76cc1a505bb44f6ee2.png)

For information, Modbus Driver, OPC-UA, Siemens Drivers, Tag Historian, UDP and TCP Drivers, User Manual and Vision modules are activated, and all the others are running (2 hours trial that i can reset).

There is probably something simple that i am misssing but i cannot figure what it is…

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [June 4, 2019, 7:34am UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/6 "2019-06-04T07:34:19Z")

</div>

You will need to install the module.

You can download the module here: [https://files.inductiveautomation.com/release/ia/build7.9.4/20170829-1101/SQL%20Bridge-module.modl](https://files.inductiveautomation.com/release/ia/build7.9.4/20170829-1101/SQL%20Bridge-module.modl)

---

<div class="post-metadata">

**Author:** ![nagewaza1009](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nagewaza1009](https://forum.inductiveautomation.com/u/nagewaza1009)\
**Post date:** [June 4, 2019, 7:40am UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/7 "2019-06-04T07:40:08Z")

</div>

How is it that i cannot download the module from the Gateway ?

Unfortunately the file cannot be opened…

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [June 4, 2019, 7:51am UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/8 "2019-06-04T07:51:52Z")

</div>

Try going here:

[https://inductiveautomation.com/downloads/archive](https://inductiveautomation.com/downloads/archive)

Select your version, then scroll down to find the SQL Bridge module.

---

<div class="post-metadata">

**Author:** ![nagewaza1009](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nagewaza1009](https://forum.inductiveautomation.com/u/nagewaza1009)\
**Post date:** [June 4, 2019, 7:54am UTC](https://forum.inductiveautomation.com/t/keep-only-strictly-positive-samples-of-a-historian-tag/25500/9 "2019-06-04T07:54:04Z")

</div>

I figured it out, thank you very much for your help !
