# First-out alarm pareto

**URL:** <https://forum.inductiveautomation.com/t/first-out-alarm-pareto/38854>\
**Category:** Ignition\
**Created:** [September 19, 2020, 4:00am UTC](https://forum.inductiveautomation.com/t/first-out-alarm-pareto/38854 "2020-09-19T04:00:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrautomation](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vrautomation/32/11155_2.png) [@vrautomation](https://forum.inductiveautomation.com/u/vrautomation)\
**Post date:** [September 19, 2020, 4:00am UTC](https://forum.inductiveautomation.com/t/first-out-alarm-pareto/38854/1 "2020-09-19T04:00:25Z")

</div>

Hello Ignition’s community 🙂

We have a plc that return the first out alarm in a register. This register is an integer relative to the first alarm that cause the stop of the machine.

This integer can be match with a corresponding alarm message (I would see a table 3 columns: Machine, IntegerValue, Message).

My goal is to show a pareto of the Top 10 first-out.

How would you do this?

Thanks.

---

<div class="post-metadata">

**Author:** ![dustin.cooper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dustin.cooper/32/29963_2.png) [@dustin.cooper](https://forum.inductiveautomation.com/u/dustin.cooper)\
**Post date:** [September 19, 2020, 4:31am UTC](https://forum.inductiveautomation.com/t/first-out-alarm-pareto/38854/2 "2020-09-19T04:31:43Z")

</div>

One way would be to monitor the integer value tag and fire a tag change script that loads a database table each time the value changes.  
You could then query that table and sort by the top 10 most frequent alarms over a given period.

---

<div class="post-metadata">

**Author:** ![vrautomation](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vrautomation/32/11155_2.png) [@vrautomation](https://forum.inductiveautomation.com/u/vrautomation)\
**Post date:** [September 21, 2020, 2:47am UTC](https://forum.inductiveautomation.com/t/first-out-alarm-pareto/38854/3 "2020-09-21T02:47:41Z")

</div>

True.

I was wondering that could be done using more standards functions of the historian…

If it’s not possible then yes we will do some specific SQL.
