<?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 compare average between two non-adjacent time periods? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611541#M212620</link>
    <description>&lt;P&gt;ouh yeah, you are right. That was a typo. I've fixed the type now. The questions stays the same.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 06:25:39 GMT</pubDate>
    <dc:creator>BenTreeser</dc:creator>
    <dc:date>2022-09-01T06:25:39Z</dc:date>
    <item>
      <title>How to compare average between two non-adjacent time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611465#M212597</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;what' the best way to compare averages between two non-adjacent time periods. I have bunch of api call events with response_time field. I need a dashboard, where I can see the performance difference between last month and current month.&lt;/P&gt;&lt;P&gt;If I try the following, somehow the averages are blank in dashboard, but click on the enlarging glass of the tile, I get a a search query with values. What am I missing?&lt;/P&gt;&lt;P&gt;Is there an even more efficient and faster way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;API Performance&amp;lt;/label&amp;gt;
  &amp;lt;search id="multisearch"&amp;gt;
    &amp;lt;query&amp;gt;| multisearch 
	[ search earliest=$periodBeforeTok.earliest$ latest=$periodBeforeTok.latest$  index=A my_search_query response_time=*
		| eval response_time_before=response_time
		| fields api_request response_time_before
		| eval timeSlot="1"  ]
	 [search earliest=$periodAfterTok.earliest$ latest=$periodAfterTok.latest$ index=A my_search_query
		| eval response_time_after=response_time
		| fields api_request response_time_after
		| eval timeSlot="2" ]
	&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldset submitButton="true" autoRun="false"&amp;gt;
    &amp;lt;input type="time" token="periodBeforeTok"&amp;gt;
      &amp;lt;label&amp;gt;Before Time Period&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;1658707200&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;1659312000&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="time" token="periodAfterTok"&amp;gt;
      &amp;lt;label&amp;gt;After Time Period&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;1659312000&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;1659916800&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Query Stats&amp;lt;/title&amp;gt;
        &amp;lt;search base="multisearch"&amp;gt;
          &amp;lt;query&amp;gt;| stats  count as totalCount, count(eval(timeSlot=1)) as totalCountBefore, count(eval(timeSlot=2)) as totalCountAfter, avg(response_time_before) as response_time_before, avg(response_time_after) as response_time_after by api_request
	| eval response_time_before=round(response_time_before/1000,3)
	| eval response_time_after=round(response_time_after/1000,3)
	| eval delta_response_time=response_time_after-response_time_before
	| table api_request totalCountBefore totalCountAfter response_time_before response_time_after delta_response_time&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 06:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611465#M212597</guid>
      <dc:creator>BenTreeser</dc:creator>
      <dc:date>2022-09-01T06:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare average between two non-adjacent time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611497#M212604</link>
      <description>&lt;P&gt;Is this just a typo? Your multisearch has fields api_api_request whereas your stats has api_request&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 18:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611497#M212604</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-31T18:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare average between two non-adjacent time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611541#M212620</link>
      <description>&lt;P&gt;ouh yeah, you are right. That was a typo. I've fixed the type now. The questions stays the same.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 06:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-average-between-two-non-adjacent-time-periods/m-p/611541#M212620</guid>
      <dc:creator>BenTreeser</dc:creator>
      <dc:date>2022-09-01T06:25:39Z</dc:date>
    </item>
  </channel>
</rss>

