<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Overlay an average line on a bar graph of counts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Overlay-an-average-line-on-a-bar-graph-of-counts/m-p/333014#M99044</link>
    <description>&lt;P&gt;I have a search &lt;CODE&gt;index=safes TransactionCode=DOPN OR TransactionCode=DCLO  Details="Door A Opened" OR Details="Door A Closed" &lt;BR /&gt;
| transaction open_close startswith=DOPN endswith=DCLO maxevents=2 | search eventcount=2&lt;BR /&gt;
| stats count(duration) as Events by Location&lt;/CODE&gt; .  &lt;/P&gt;

&lt;P&gt;This gives me the number of relevant events by Location for the month I'm looking at.  I want to display an average value line across the bar graph.  However changing the last command to &lt;CODE&gt;|stats count(duration) as Events, avg(Events) as Event_avg by Location&lt;/CODE&gt; doesn't create a value for Event avg and doesn't let me select Event avg as an overlay on the graph.  I've seen many questions similar to this but  the answers all seemed to refer to splitting up events by &lt;CODE&gt;_time&lt;/CODE&gt; rather than some other field such as Location.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 17:19:40 GMT</pubDate>
    <dc:creator>ellenbytech</dc:creator>
    <dc:date>2017-07-25T17:19:40Z</dc:date>
    <item>
      <title>Overlay an average line on a bar graph of counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overlay-an-average-line-on-a-bar-graph-of-counts/m-p/333014#M99044</link>
      <description>&lt;P&gt;I have a search &lt;CODE&gt;index=safes TransactionCode=DOPN OR TransactionCode=DCLO  Details="Door A Opened" OR Details="Door A Closed" &lt;BR /&gt;
| transaction open_close startswith=DOPN endswith=DCLO maxevents=2 | search eventcount=2&lt;BR /&gt;
| stats count(duration) as Events by Location&lt;/CODE&gt; .  &lt;/P&gt;

&lt;P&gt;This gives me the number of relevant events by Location for the month I'm looking at.  I want to display an average value line across the bar graph.  However changing the last command to &lt;CODE&gt;|stats count(duration) as Events, avg(Events) as Event_avg by Location&lt;/CODE&gt; doesn't create a value for Event avg and doesn't let me select Event avg as an overlay on the graph.  I've seen many questions similar to this but  the answers all seemed to refer to splitting up events by &lt;CODE&gt;_time&lt;/CODE&gt; rather than some other field such as Location.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 17:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overlay-an-average-line-on-a-bar-graph-of-counts/m-p/333014#M99044</guid>
      <dc:creator>ellenbytech</dc:creator>
      <dc:date>2017-07-25T17:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay an average line on a bar graph of counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Overlay-an-average-line-on-a-bar-graph-of-counts/m-p/333015#M99045</link>
      <description>&lt;P&gt;Add at the end... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eventstats avg(Events) as Event_avg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will put the same overall average on every event.  &lt;/P&gt;

&lt;P&gt;Haven't done overlays myself, so that only gets you halfway there, but the data will be available anyway. &lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 17:35:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Overlay-an-average-line-on-a-bar-graph-of-counts/m-p/333015#M99045</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-25T17:35:30Z</dc:date>
    </item>
  </channel>
</rss>

