<?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 Re: How to calculate average for the data which will get changed based on time interval ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513600#M144115</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64317"&gt;@rnowitzki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 16:12:47 GMT</pubDate>
    <dc:creator>georgear7</dc:creator>
    <dc:date>2020-08-11T16:12:47Z</dc:date>
    <item>
      <title>How to calculate average for the data which will get changed based on time interval ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513599#M144114</link>
      <description>&lt;P&gt;I have below kind of data.&lt;/P&gt;&lt;P&gt;App Name Status&lt;BR /&gt;App1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;App7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;App10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;0 - Success&lt;BR /&gt;1 - Failure&lt;/P&gt;&lt;P&gt;Assign,&lt;BR /&gt;0 as 100%&lt;BR /&gt;1 as 0%&lt;/P&gt;&lt;P&gt;Here status value will get updated every 5 mins. So my requirement is to calculate the average from the starting time of day till present time by app. In this table, success percentage will be 90%. Similarly query should work if i want to calculate the average time after n'th update.&lt;/P&gt;&lt;P&gt;Next thing is i want to keep current status in one variable. and my final output should be having 2 data, one is current status and other one is Average data.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 16:10:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513599#M144114</guid>
      <dc:creator>georgear7</dc:creator>
      <dc:date>2020-08-11T16:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate average for the data which will get changed based on time interval ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513600#M144115</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64317"&gt;@rnowitzki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 16:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513600#M144115</guid>
      <dc:creator>georgear7</dc:creator>
      <dc:date>2020-08-11T16:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate average for the data which will get changed based on time interval ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513632#M144134</link>
      <description>&lt;P&gt;Here's a run-anywhere search for the first set of requirements.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="App Name Status
App1                0
App2               0
App3               0
App4               0
App5               0
App6               1
App7               0
App8               0
App9               0
App10            0" | multikv forceheader=1
``` Above just defines test data```
| stats sum(Status) as status,count
| eval SuccessRate= 100-((status*100)/count)
| table SuccessRate&lt;/LI-CODE&gt;&lt;P&gt;I don't understand the remaining requirements.&amp;nbsp; What is the average of?&amp;nbsp; Over what time?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 20:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513632#M144134</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-11T20:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate average for the data which will get changed based on time interval ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513655#M144142</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;As i mentioned, Status of each App will get updated every 5 mins, It's live data.&lt;/P&gt;&lt;P&gt;For eg, if you take App1, starting from day...Means from 12.00 AM..&lt;/P&gt;&lt;P&gt;At 12.00 AM, first status will be updated for all the apps. then at 00.05, 00.10, 00.15........It goes on&lt;/P&gt;&lt;P&gt;Finally what my requirement is, to calculate the average and current status of each app separately by assigning 100 to success (ie. 0) and 0 to failure(ie. 1). I need this day wise, so next day it should start from 12 AM again.&lt;/P&gt;&lt;P&gt;If i run my query at anytime in a day, it should give me current status and average status for each app like below.&lt;/P&gt;&lt;P&gt;The final output table should be,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Current Status&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Average Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;90%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App3&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;0&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;80%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;App5&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this clarifies you.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 02:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513655#M144142</guid>
      <dc:creator>georgear7</dc:creator>
      <dc:date>2020-08-12T02:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate average for the data which will get changed based on time interval ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513704#M144160</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="App Name Status
App1                0
App2               0
App3               0
App4               0
App5               0
App6               1
App7               0
App8               0
App9               0
App10            0" | multikv forceheader=1
```Above is just for test data```
| stats sum(Status) as status,count, latest(Status) as Current by App
| eval Average= 100-((status*100)/count), Current=100-(Current*100)
| table App, Current, Average&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Aug 2020 12:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-average-for-the-data-which-will-get-changed/m-p/513704#M144160</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-12T12:01:48Z</dc:date>
    </item>
  </channel>
</rss>

