<?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: Need help with Spunk query calculating TPS variance in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648228#M53037</link>
    <description>&lt;P&gt;Timechart will fill in the missing time periods so if you want to restrict the stats you should apply the restriction / filter after the timechart command - you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where strftime(_time, "%H") &amp;gt;= 14 AND strftime(_time, "%H") &amp;lt; 16&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 26 Jun 2023 16:34:58 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-06-26T16:34:58Z</dc:date>
    <item>
      <title>How to write Splunk search to calculate TPS variance?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/647998#M53016</link>
      <description>&lt;P&gt;The below query is giving the results for 30 days MaxTPS data. (Between the time range of 2:00 to 4:00)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=&amp;lt;search_strings&amp;gt; earliest=-30d@d date_hour&amp;gt;=2 AND date_hour&amp;lt;4
| timechart span=120m count(eval(searchmatch("sent"))) as HotCountToday
| eval TPS=round(HotCountToday/(120*60),2)
| eval Day=strftime(_time, "%Y-%m-%d")
| stats max(TPS) as MaxTPS by Day&lt;/LI-CODE&gt;
&lt;P&gt;Now I want to calculate the "MaxTPS Variance" for complete 30 days. Calculate the percentage MaxTPS variance between "Today's value to last week's value" (and so on) and show the MaxTPS variance percentage. (Example: Monday to last week Monday; Sunday to last week Sunday and so on)&lt;BR /&gt;&lt;BR /&gt;I am new to Splunk and still learning. Looking forward to hear from you. Kindly suggest how this can be achieved.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/110013"&gt;@xpac&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 15:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/647998#M53016</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-26T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648001#M53017</link>
      <description>&lt;P&gt;Current Output:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;&lt;STRONG&gt;Day&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;&lt;STRONG&gt;MaxTPS&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;2023-05-23&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;1.40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;2023-05-22&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;1.10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;and so on&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-06-22&lt;/TD&gt;&lt;TD&gt;1.34&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 22 Jun 2023 19:06:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648001#M53017</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-22T19:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648005#M53018</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Expected Output:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;Date columns showing the Variance %&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;TestMQ&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-22&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-21&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-20&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-19&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-18&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-17&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-16&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-15&lt;/TD&gt;&lt;TD width="10%"&gt;And so on - for 30 days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.Test&lt;/TD&gt;&lt;TD width="10%"&gt;60.00%&lt;/TD&gt;&lt;TD width="10%"&gt;20.00%&lt;/TD&gt;&lt;TD width="10%"&gt;10.00%&lt;/TD&gt;&lt;TD width="10%"&gt;80.00%&lt;/TD&gt;&lt;TD width="10%"&gt;5.00%&lt;/TD&gt;&lt;TD width="10%"&gt;19.00%&lt;/TD&gt;&lt;TD width="10%"&gt;10.00%&lt;/TD&gt;&lt;TD width="10%"&gt;95.00%&lt;/TD&gt;&lt;TD width="10%"&gt;--&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 23 Jun 2023 11:56:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648005#M53018</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-23T11:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648008#M53020</link>
      <description>&lt;LI-CODE lang="markup"&gt;| autoregress MaxTPS p=7
| eval Variance_TPS_Today=case(MaxTPS_p7 &amp;gt; MaxTPS, round(((MaxTPS_p7 - MaxTPS) / MaxTPS_p7) * 100,2),MaxTPS_p7 &amp;lt; MaxTPS, round(((MaxTPS - MaxTPS_p7) / MaxTPS) * 100,2),MaxTPS_p7 = MaxTPS, round(((MaxTPS_p7 - MaxTPS)) * 100,2))
| eval Date=strftime(_time,"%F")
| eval Name="Test"
| chart useother=f values(Variance_TPS_Today) as variance by Name Date&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jun 2023 20:34:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648008#M53020</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-22T20:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648022#M53021</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thanks for your kind response. I have written a below query which is providing the TPS average variance output for complete 30 days.&lt;BR /&gt;&lt;BR /&gt;Can you please help guide me with the below logic and how to modify this query for MaxTPS variance?&lt;BR /&gt;&lt;BR /&gt;I want to modify this query for calculating &lt;U&gt;&lt;STRONG&gt;MaxTPS variance (instead of the below logic for Average TPS variance)&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Modification to be added:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;index=&amp;lt;search string&amp;gt; earliest=-30d@d date_hour&amp;gt;=$timefrom$ AND date_hour&amp;lt;$timeto$&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;| timechart span=$TotalMinutes $m&lt;/STRONG&gt;&lt;/EM&gt; count(eval(searchmatch("sent"))) as HotCountToday&lt;BR /&gt;| eval TPS=round(HotCountToday/($TotalMinutes $*60),2)&lt;BR /&gt;| eval TotalMinutes = ($timeto$ - $timefrom$) * 60&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;| eval Day=strftime(_time, "%Y-%m-%d")&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;| stats max(TPS) as MaxTPS by Day&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 04:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648022#M53021</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-23T04:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648023#M53022</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Expected Output as below:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;TestMQ&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-23&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-22&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-21&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-20&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-19&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-18&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-17&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-16&lt;/TD&gt;&lt;TD width="10%"&gt;And so on - till 30 days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.NAME&lt;/TD&gt;&lt;TD width="10%"&gt;5.003&lt;/TD&gt;&lt;TD width="10%"&gt;17.004&lt;/TD&gt;&lt;TD width="10%"&gt;25.775&lt;/TD&gt;&lt;TD width="10%"&gt;19.882&lt;/TD&gt;&lt;TD width="10%"&gt;32.114&lt;/TD&gt;&lt;TD width="10%"&gt;56.881&lt;/TD&gt;&lt;TD width="10%"&gt;10.991&lt;/TD&gt;&lt;TD width="10%"&gt;85.114&lt;/TD&gt;&lt;TD width="10%"&gt;....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 07:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648023#M53022</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-27T07:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648058#M53025</link>
      <description>&lt;P&gt;I am not really sure what it is you are asking - if you want the variance of the MaxTPS for each day compared to the MaxTPS 7 days prior, try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=&amp;lt;search string&amp;gt; earliest=-30d@d date_hour&amp;gt;=$timefrom$ AND date_hour&amp;lt;$timeto$
| timechart span=$TotalMinutes $m count(eval(searchmatch("sent"))) as HotCountToday
| eval TPS=round(HotCountToday/($TotalMinutes $*60),2)
| eval TotalMinutes = ($timeto$ - $timefrom$) * 60
| eval Day=strftime(_time, "%Y-%m-%d")
| stats max(TPS) as MaxTPS by Day
| autoregress MaxTPS p=7
| eval Variance_TPS_Today=case(MaxTPS_p7 &amp;gt; MaxTPS, round(((MaxTPS_p7 - MaxTPS) / MaxTPS_p7) * 100,2),MaxTPS_p7 &amp;lt; MaxTPS, round(((MaxTPS - MaxTPS_p7) / MaxTPS) * 100,2),MaxTPS_p7 = MaxTPS, round(((MaxTPS_p7 - MaxTPS)) * 100,2))
| eval Date=strftime(_time,"%F")
| eval Name="Test"
| chart useother=f values(Variance_TPS_Today) as variance by Name Date&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Jun 2023 15:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648058#M53025</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-23T15:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648096#M53026</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thank you for your kind response. I tried your suggested approach, but the query is not giving any output. Yes, you understood my requirement correctly - "&lt;STRONG&gt;I&amp;nbsp;want the variance of the MaxTPS for each day compared to the MaxTPS 7 days prior&lt;/STRONG&gt;"&lt;BR /&gt;&lt;BR /&gt;Please suggest, how this can be modified further to achieve the below expected output results.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Query Used:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;index=&amp;lt;search_strings&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| timechart span=120m count(eval(searchmatch("sent"))) as HotCountToday&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;by TestMQ&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval TPS=round(HotCountToday/(120*60),2)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Day=strftime(_time, "%Y-%m-%d")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| stats max(TPS) as MaxTPS by Day&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| autoregress MaxTPS p=7&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Variance_TPS_Today=case&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(MaxTPS_p7 &amp;gt; MaxTPS, round(((MaxTPS_p7 - MaxTPS) / MaxTPS_p7) * 100,2),&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MaxTPS_p7 &amp;lt; MaxTPS, round(((MaxTPS - MaxTPS_p7) / MaxTPS) * 100,2),&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MaxTPS_p7 = MaxTPS, round(((MaxTPS_p7 - MaxTPS)) * 100,2))&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Date=strftime(_time,"%F")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| chart useother=f values(Variance_TPS_Today) as variance by TestMQ Date&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;U&gt;&lt;STRONG&gt;Expected Output:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;TestMQ&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-24&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-23&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-22&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-21&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-20&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-19&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-18&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-17&lt;/TD&gt;&lt;TD width="10%"&gt;and so on..&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.NAME&lt;/TD&gt;&lt;TD width="10%"&gt;19.79&lt;/TD&gt;&lt;TD width="10%"&gt;10.17&lt;/TD&gt;&lt;TD width="10%"&gt;5.18&lt;/TD&gt;&lt;TD width="10%"&gt;61.13&lt;/TD&gt;&lt;TD width="10%"&gt;79.13&lt;/TD&gt;&lt;TD width="10%"&gt;77.51&lt;/TD&gt;&lt;TD width="10%"&gt;31.23&lt;/TD&gt;&lt;TD width="10%"&gt;83.12&lt;/TD&gt;&lt;TD width="10%"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;U&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2023 12:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648096#M53026</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-24T12:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648126#M53027</link>
      <description>&lt;P&gt;Where does Test.MQ come from? Is this a new requirement that you haven't mentioned before (have you been wasting my time by not clearly specifying what you are trying to do?)?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2023 23:04:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648126#M53027</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-24T23:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648130#M53028</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Apologize for the confusion! Please allow me to clarify it again.&lt;BR /&gt;So instead of using &lt;STRONG&gt;&lt;EM&gt;| eval Name="TestMQ"&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;I wanted to use this as group &lt;EM&gt;&lt;STRONG&gt;by TestMQ&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;Only that part is changed,&amp;nbsp; because I was not sure about the query and expected output.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you please help further suggest on this changes?&lt;BR /&gt;&lt;BR /&gt;Again, apologize for any confusion!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Query Used:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;index=&amp;lt;search_strings&amp;gt;&lt;BR /&gt;| rex "(?&amp;lt;TestMQ&amp;gt;*)"&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| timechart span=120m count(eval(searchmatch("sent"))) as HotCountToday&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;by TestMQ&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval TPS=round(HotCountToday/(120*60),2)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Day=strftime(_time, "%Y-%m-%d")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| stats max(TPS) as MaxTPS by Day&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| autoregress MaxTPS p=7&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Variance_TPS_Today=case&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(MaxTPS_p7 &amp;gt; MaxTPS, round(((MaxTPS_p7 - MaxTPS) / MaxTPS_p7) * 100,2),&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MaxTPS_p7 &amp;lt; MaxTPS, round(((MaxTPS - MaxTPS_p7) / MaxTPS) * 100,2),&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MaxTPS_p7 = MaxTPS, round(((MaxTPS_p7 - MaxTPS)) * 100,2))&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Date=strftime(_time,"%F")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| chart useother=f values(Variance_TPS_Today) as variance by TestMQ Date&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;U&gt;&lt;STRONG&gt;Expected Output:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;TestMQ&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-24&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-23&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-22&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-21&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-20&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-19&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-18&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-17&lt;/TD&gt;&lt;TD width="10%"&gt;and so on..&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.NAME&lt;/TD&gt;&lt;TD width="10%"&gt;19.79&lt;/TD&gt;&lt;TD width="10%"&gt;10.17&lt;/TD&gt;&lt;TD width="10%"&gt;5.18&lt;/TD&gt;&lt;TD width="10%"&gt;61.13&lt;/TD&gt;&lt;TD width="10%"&gt;79.13&lt;/TD&gt;&lt;TD width="10%"&gt;77.51&lt;/TD&gt;&lt;TD width="10%"&gt;31.23&lt;/TD&gt;&lt;TD width="10%"&gt;83.12&lt;/TD&gt;&lt;TD width="10%"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 25 Jun 2023 03:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648130#M53028</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-25T03:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648132#M53029</link>
      <description>&lt;P&gt;So, your expected output would have multiple rows?&lt;/P&gt;&lt;P&gt;Do you not think this is a fundamental part of your requirement, and should have been clarified from the outset?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 05:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648132#M53029</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-25T05:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648135#M53030</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, the expected output would have multiple rows with different TestMQ names. And the requirement is to show MaxTPS variance for each TestMQ names.&lt;/P&gt;&lt;P&gt;I agree on my mistake - I could have been more specific while sharing the initial requirement.&lt;/P&gt;&lt;P&gt;Requesting you to suggest what different approach can be tried here?&lt;/P&gt;&lt;P&gt;Thank you for your understanding. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 05:45:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648135#M53030</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-25T05:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648136#M53031</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=&amp;lt;search_strings&amp;gt;
| rex "(?&amp;lt;TestMQ&amp;gt;*)"

| timechart span=120m aligntime=earliest count(eval(searchmatch("sent"))) as HotCountToday by TestMQ
| untable _time TestMQ HotCountToday
| eval TPS=round(HotCountToday/(120*60),2)
| eval Day=strftime(_time,"%Y-%m-%d")
| stats max(TPS) as MaxTPS by Day TestMQ
| xyseries Day TestMQ MaxTPS
| streamstats list(*) as * window=8
| foreach *
    [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="Day",mvindex(Day,-1),if(mvcount('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')&amp;lt;8,null(),case(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;gt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)),2),mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;lt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)),2),1==1,round(0,2))))]
| transpose 0 column_name=Name header_field=Day&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 25 Jun 2023 06:13:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648136#M53031</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-25T06:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648198#M53034</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Thank you so much Sir, this works as expected!&lt;BR /&gt;&lt;BR /&gt;May I ask a follow up question please? In case I want to get this result for a specific &lt;U&gt;&lt;STRONG&gt;time range&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;only (for all 30 days) and based on that MaxTPS calculation should work only for the specified time range.&lt;BR /&gt;&lt;BR /&gt;I have tried with below 3 different options but it doesn't work, no change in the output results.&lt;BR /&gt;&lt;BR /&gt;Can you please suggest if anything missed here?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;index=&amp;lt;search_strings&amp;gt;&amp;nbsp;earliest=-30d@d&amp;nbsp;&lt;STRONG&gt;date_hour&amp;gt;=2 AND date_hour&amp;lt;4&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| rex "(?&amp;lt;TestMQ&amp;gt;*)"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| timechart span=120m aligntime=earliest count(eval(searchmatch("sent"))) as HotCountToday by TestMQ&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| untable _time TestMQ HotCountToday&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval TPS=round(HotCountToday/(120*60),2)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| eval Day=strftime(_time,"%Y-%m-%d")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| stats max(TPS) as MaxTPS by Day TestMQ&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| xyseries Day TestMQ MaxTPS&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| streamstats list(*) as * window=8&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| foreach *&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;[| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="Day",mvindex(Day,-1),if(mvcount('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')&amp;lt;8,null(),case(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;gt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)),2),mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;lt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)),2),1==1,round(0,2))))]&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| transpose 0 column_name=Name header_field=Day&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;Also tried with below approach, none of them working for the time range - I am getting the same old result.&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;1.&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;index=&amp;lt;search_strings&amp;gt;&amp;nbsp;earliest=-30d@d&amp;nbsp;&lt;STRONG&gt;date_hour&amp;gt;=14 AND date_hour&amp;lt;=16&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;2. | &lt;STRONG&gt;search strftime(_time, "%H:%M:%S") &amp;gt;= "14:00:00" AND strftime(_time, "%H:%M:%S") &amp;lt;= "16:00:00"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;3. | &lt;STRONG&gt;where date_hour &amp;gt;= 14 AND date_hour &amp;lt;= 16&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 13:20:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648198#M53034</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-26T13:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648228#M53037</link>
      <description>&lt;P&gt;Timechart will fill in the missing time periods so if you want to restrict the stats you should apply the restriction / filter after the timechart command - you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where strftime(_time, "%H") &amp;gt;= 14 AND strftime(_time, "%H") &amp;lt; 16&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:34:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648228#M53037</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-26T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648277#M53040</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Getting an error with this command, please suggest.&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Point 1:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;| where strftime(_time, "%H") &amp;gt;= 14 AND strftime(_time, "%H") &amp;lt; 16&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;Error in 'where' command: Type checking failed. The '&amp;gt;=' operator received different types.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;U&gt;&lt;STRONG&gt;Point 2&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;&lt;BR /&gt;Also, one more point to add - as I am having a restriction of maximum 30 days of data in Splunk. So my query is giving me final output of 23 days only, the other remaining last 7 days coming as NULL values. How do I exclude (not show) these NULL values columns and show the MaxTPS variance of only the 23 days.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Output Now:&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;I do not want to show this NULL columns.&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;Name&lt;/TD&gt;&lt;TD width="10%"&gt;2023-05-28&lt;/TD&gt;&lt;TD width="10%"&gt;2023-05-27&lt;/TD&gt;&lt;TD width="10%"&gt;..so on&amp;nbsp;&lt;BR /&gt;(last 7 days)&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-03&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-04&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-05&lt;/TD&gt;&lt;TD width="10%"&gt;.. so on&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-26&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.Name&lt;/TD&gt;&lt;TD width="10%"&gt;&lt;STRONG&gt;NULL&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%"&gt;&lt;STRONG&gt;NULL&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%"&gt;&lt;STRONG&gt;NULL&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%"&gt;&lt;STRONG&gt;NULL&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%"&gt;10.15&lt;/TD&gt;&lt;TD width="10%"&gt;41.23&lt;/TD&gt;&lt;TD width="10%"&gt;..&lt;/TD&gt;&lt;TD width="10%"&gt;76.12&lt;/TD&gt;&lt;TD width="10%"&gt;31.67&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Expected Output:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;This final output should display only the&amp;nbsp;&lt;STRONG&gt;23 days&lt;/STRONG&gt; data (due to max limitation of 30 days data in Splunk) - and MaxTPS variance calculation is comparing with last 7 days&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%"&gt;Name&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-03&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-04&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-05&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-04&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-03&lt;/TD&gt;&lt;TD width="10%"&gt;so on ..&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-25&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-26&lt;/TD&gt;&lt;TD width="10%"&gt;2023-06-27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%"&gt;MQ.Name&lt;/TD&gt;&lt;TD width="10%"&gt;10.15&lt;/TD&gt;&lt;TD width="10%"&gt;41.23&lt;/TD&gt;&lt;TD width="10%"&gt;14.25&lt;/TD&gt;&lt;TD width="10%"&gt;76.12&lt;/TD&gt;&lt;TD width="10%"&gt;31.67&lt;/TD&gt;&lt;TD width="10%"&gt;..&lt;/TD&gt;&lt;TD width="10%"&gt;12.12&lt;/TD&gt;&lt;TD width="10%"&gt;76.14&lt;/TD&gt;&lt;TD width="10%"&gt;52.15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;Kindly help.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Jun 2023 04:13:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648277#M53040</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-27T04:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648290#M53046</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where tonumber(strftime(_time, "%H")) &amp;gt;= 14 AND tonumber(strftime(_time, "%H")) &amp;lt; 16&lt;/LI-CODE&gt;&lt;P&gt;After&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| autoregress MaxTPS p=7&lt;/LI-CODE&gt;&lt;P&gt;add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where isnotnull(MaxTPS_p7)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 05:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648290#M53046</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-27T05:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648312#M53048</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for kind response and support!&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Point 1: [Date Range condition]&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;I tried the suggested options on small part of query and found that it is not doing the search on the Event time, rather checking the Splunk time. I think this filtering needs to done on "date_hour" rather than using "_time".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Scenarios Tested:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;index=&amp;lt;search_strings&amp;gt; earliest=&lt;STRONG&gt;-1d@d&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| rex "(?&amp;lt;TestMQ&amp;gt;*)"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| timechart span=120m aligntime=earliest count(eval(searchmatch("sent"))) as HotCount by TestMQ&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;EM&gt;| where tonumber(strftime(_time, "%H")) &amp;gt;= 14 AND tonumber(strftime(_time, "%H")) &amp;lt; 16&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Getting below output:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;191,596&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;events&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(6/26/23 12:00:00.000 AM to 6/27/23 9:04:03.432 AM)&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;_time&lt;/TD&gt;&lt;TD width="50%"&gt;MQ.Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;SPAN&gt;2023-06-26 14:00 &lt;EM&gt;(This time is not referring to date_hour range)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;15043&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Expected output&lt;/STRONG&gt; is on the "date_hour" range for &lt;U&gt;&lt;STRONG&gt;14:00:00 &lt;/STRONG&gt;to&amp;nbsp;&lt;STRONG&gt;15:59:59&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;I tried the below condition as well on "&lt;STRONG&gt;date_hour&lt;/STRONG&gt;" - but it not giving any output results.&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;EM&gt;|&amp;nbsp;where date_hour &amp;gt;= 14 AND date_hour &amp;lt; 16&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;Point 2: [NULL values]&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;And on the query part of the NULL scenario - I think you referred to an old query suggested.&lt;BR /&gt;In the modified query, we are not using this "&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;autoregress MaxTPS p=7&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;" (refer below)&lt;BR /&gt;&lt;BR /&gt;Kindly clarify where exactly these null changes to be added:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;| where isnotnull(MaxTPS_p7)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;index=&amp;lt;search_string&amp;gt; earliest=-30d@d&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| rex "(?&amp;lt;TestMQ&amp;gt;.*)"&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| timechart span=120m aligntime=earliest count(eval(searchmatch("sent"))) as HotCount by TestMQ&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| untable _time TestMQ HotCount &lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| eval TPS=round(HotCount/(120*60),2)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| eval Day=strftime(_time,"%Y-%m-%d")&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| stats max(TPS) as MaxTPS by Day TestMQ &lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| xyseries Day TestMQ MaxTPS&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| streamstats list(*) as * window=8&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| foreach *&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;[| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="Day",mvindex(Day,-1),if(mvcount('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')&amp;lt;8,null(),&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;case(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;gt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)),2),mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;lt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)),2),1==1,round(0,2))))]&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| transpose 0 column_name=Name header_field=Day&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 07:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648312#M53048</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-27T07:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648321#M53050</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;U&gt;&lt;STRONG&gt;Point 1: [Date Range condition]&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;I tried the suggested options on small part of query and found that it is not doing the search on the Event time, rather checking the Splunk time. I think this filtering needs to done on "date_hour" rather than using "_time".&lt;/BLOCKQUOTE&gt;&lt;P&gt;Obviously, you know your data better than I, so, what do you mean by Event time and Splunk time?&lt;/P&gt;&lt;P&gt;Bear in mind that date_hour is based on _time (at least in my environment) and date_hour gets removed by the timechart command.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 08:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648321#M53050</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-27T08:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Spunk query calculating TPS variance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648337#M53053</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you! Let me revalidate again and come back on this time range changes suggested by you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Meanwhile, can you please help suggest on the other part for the NULL values? Below for your reference:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Point 2: [NULL values]&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;And on the query part of the NULL scenario - I think you referred to an old query suggested.&lt;BR /&gt;In the modified query, we are not using this "&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;autoregress MaxTPS p=7&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;" (refer below)&lt;BR /&gt;&lt;BR /&gt;Kindly clarify where exactly these null changes to be added:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;| where isnotnull(MaxTPS_p7)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;I tried modifying it as below, but no change in output results.&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;| stats max(TPS) as MaxTPS by Day TestMQ&lt;BR /&gt;| where isnotnull(MaxTPS)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;index=&amp;lt;search_string&amp;gt; earliest=-30d@d&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| rex "(?&amp;lt;TestMQ&amp;gt;.*)"&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| timechart span=120m aligntime=earliest count(eval(searchmatch("sent"))) as HotCount by TestMQ&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| untable _time TestMQ HotCount&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| eval TPS=round(HotCount/(120*60),2)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| eval Day=strftime(_time,"%Y-%m-%d")&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| stats max(TPS) as MaxTPS by Day TestMQ&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| xyseries Day TestMQ MaxTPS&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| streamstats list(*) as * window=8&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| foreach *&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;[| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="Day",mvindex(Day,-1),if(mvcount('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')&amp;lt;8,null(),&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;case(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;gt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)),2),mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)&amp;lt;mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7),round(100*(tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7))-tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',0)))/tonumber(mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',7)),2),1==1,round(0,2))))]&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;| transpose 0 column_name=Name header_field=Day&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 09:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-Splunk-search-to-calculate-TPS-variance/m-p/648337#M53053</guid>
      <dc:creator>shashankk</dc:creator>
      <dc:date>2023-06-27T09:17:06Z</dc:date>
    </item>
  </channel>
</rss>

