# Rolling up Downtime Reasons

**URL:** <https://forum.inductiveautomation.com/t/rolling-up-downtime-reasons/9106>\
**Category:** 3rd Party Modules\
**Created:** [September 26, 2014, 7:33pm UTC](https://forum.inductiveautomation.com/t/rolling-up-downtime-reasons/9106 "2014-09-26T19:33:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [September 26, 2014, 7:33pm UTC](https://forum.inductiveautomation.com/t/rolling-up-downtime-reasons/9106/1 "2014-09-26T19:33:12Z")

</div>

I’ve been asked to categorize downtime reasons (e.g. all E-stops under one category, guards under another, etc.) and then when showing top downtime reasons show just the category with counts and let the user drill down for specific reasons. I’ve organized reason codes this way but am stuck as to how to display them that way.

Kurt

---

<div class="post-metadata">

**Author:** ![IronYeti](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ironyeti/32/4124_2.png) [@IronYeti](https://forum.inductiveautomation.com/u/IronYeti)\
**Post date:** [November 10, 2014, 9:42pm UTC](https://forum.inductiveautomation.com/t/rolling-up-downtime-reasons/9106/2 "2014-11-10T21:42:42Z")

</div>

I have the same need to roll up / categorize / summarize the downtime reasons into groups. Here is how I’m looking at implementing myself on my current project (using 7.7.1). In my case I need to categorize into three groups (Operator, Equipment, External).

Idea #1  
Create the categories ahead of time, then assign them reason codes. These codes aren’t reported by the PLC, but they are pointed to by other codes. For example:  
[ul]DT code = 10 for E-Stop  
DT code = 11 for Guards  
etc.[/ul]  
then the actual individual downtime reasons for each of the E-Stops have a sub-reason code of 10, all guards have a sub-reason code of 11, etc. In the reporting you could then select this category code for reporting

Idea #2  
Create an additional factor and tag. Then use expressions in the tag to determine what category it belongs to. If all of your E-stops reasons have values 100-199 for example, then it’s a simple expression. In your reports just filter on the additional factor.

Note that I have not implemented these yet, so I’m not sure if there’s any issues or pain points doing this. And the original post is now 1.5 months old, so that user likely already figured something out.

Obviously one concern is being flexible, and hard coding reasons is not good. Idea #1 adds more reasons to an already long list of reasons. Idea #2 can get complicated (or impractical) if reason codes aren’t already organized to fit it. And both ideas suffer from categories being hard-coded.

Kurt - let us know how you handled this. Anyone else, let us know what you think of these two ideas or how you handled this.

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [November 11, 2014, 1:17pm UTC](https://forum.inductiveautomation.com/t/rolling-up-downtime-reasons/9106/3 "2014-11-11T13:17:05Z")

</div>

Projects on hold for a bit. As IA is silent on this forum (or so it appears), I decided to approach it by trying what amounts to your idea 1. All the various e-stops are a subreason of one item called E-Stop.
