<?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: Using stats -  how to correlate a value to time of day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80790#M20424</link>
    <description>&lt;P&gt;I've actually done something similar to both these approaches, but I'm looking for something more like "tell me that there's a correlation to a particular time of day, so I should run the timechart". I'm tracking multiple products so I want to spot the one that correlates better than others, or the ones that seem to have a lower price at specific times of the day.  Something like show me the std deviation of the sales price across time slices. ie. Check the prices for the same item on subsequent days at 2PM, 3PM, 4PM, etc to find the lowest value.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 30 Oct 2010 02:16:54 GMT</pubDate>
    <dc:creator>briang67</dc:creator>
    <dc:date>2010-10-30T02:16:54Z</dc:date>
    <item>
      <title>Using stats -  how to correlate a value to time of day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80788#M20422</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have an app where I'm splunking a sales price of an item that fluctuates throughout the day. Is there a way using the stats command to correlate whether it's more likely for the price to be a certain value at a certain time of day? Like would the product sales price tend to be lower earlier rather than later in the day...
Would the analyzefields function be used for this?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2010 01:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80788#M20422</guid>
      <dc:creator>briang67</dc:creator>
      <dc:date>2010-10-30T01:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using stats -  how to correlate a value to time of day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80789#M20423</link>
      <description>&lt;P&gt;I'd start with something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | stats min(price) max(price) avg(price) by date_hour | sort date_hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or maybe if there's also variation from products to products (Im making up a field called productCategory)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | chart avg(price) over date_hour by productCategory 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Oct 2010 01:53:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80789#M20423</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-10-30T01:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using stats -  how to correlate a value to time of day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80790#M20424</link>
      <description>&lt;P&gt;I've actually done something similar to both these approaches, but I'm looking for something more like "tell me that there's a correlation to a particular time of day, so I should run the timechart". I'm tracking multiple products so I want to spot the one that correlates better than others, or the ones that seem to have a lower price at specific times of the day.  Something like show me the std deviation of the sales price across time slices. ie. Check the prices for the same item on subsequent days at 2PM, 3PM, 4PM, etc to find the lowest value.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2010 02:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80790#M20424</guid>
      <dc:creator>briang67</dc:creator>
      <dc:date>2010-10-30T02:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using stats -  how to correlate a value to time of day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80791#M20425</link>
      <description>&lt;P&gt;If that's what you're looking for, you should look for correlations between &lt;CODE&gt;date_hour&lt;/CODE&gt; and &lt;CODE&gt;price&lt;/CODE&gt;, perhaps using &lt;CODE&gt;correlate&lt;/CODE&gt; or &lt;CODE&gt;analyzefields&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2010 02:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-stats-how-to-correlate-a-value-to-time-of-day/m-p/80791#M20425</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-10-30T02:22:44Z</dc:date>
    </item>
  </channel>
</rss>

