<?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: Compare data from Yesterday and today without Weekend in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328935#M163286</link>
    <description>&lt;P&gt;You could use &lt;CODE&gt;relative_time&lt;/CODE&gt; to look back yesterday then add an additional condition which will exclude any low volume counts (Assuming the weekends are low counts compared to the week)&lt;/P&gt;</description>
    <pubDate>Sat, 27 Jan 2018 00:45:59 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2018-01-27T00:45:59Z</dc:date>
    <item>
      <title>Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328934#M163285</link>
      <description>&lt;P&gt;host=somehost sourcetype=somesource earliest=@d+9h latest=now| timechart span=15m dc(UserId)&lt;BR /&gt;
| appendcols [search host=somehost sourcetype=somesource earliest=-d@d+9h latest=now-d@d| timechart span=15m dc(UserId)]&lt;/P&gt;

&lt;P&gt;I know I got the syntax wrong here =&amp;gt; latest=now-d@d&lt;/P&gt;

&lt;P&gt;My report is running every 15min Mon-Fri.  */15 * * * 1-5&lt;/P&gt;

&lt;P&gt;I want to display today's values vs Yesterdays value.  If Today is Monday, then Yesterday should be Friday for any other days Today should be comparing with previous days.  Since Today is Monday, yesterday is weekend.  I only want weekdays.  I seen similar example but not what I am looking for.&lt;/P&gt;

&lt;P&gt;Since I am using now as latest - some time I am getting my 15min reports in two line.  Is there anyway we can make sure we only one one line of answer.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 00:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328934#M163285</guid>
      <dc:creator>manapuna</dc:creator>
      <dc:date>2018-01-27T00:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328935#M163286</link>
      <description>&lt;P&gt;You could use &lt;CODE&gt;relative_time&lt;/CODE&gt; to look back yesterday then add an additional condition which will exclude any low volume counts (Assuming the weekends are low counts compared to the week)&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 00:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328935#M163286</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-01-27T00:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328936#M163287</link>
      <description>&lt;P&gt;not ideal or maybe not possible for your use case, but have you considered running this report Tue-Fri and a different one on Mondays?&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 01:26:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328936#M163287</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-01-27T01:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328937#M163288</link>
      <description>&lt;P&gt;i feel like always end up doing this stuff the hard way, but maybe something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=@d+9h 
| timechart span=15m count
| eval interval = trim(strftime(_time,"%I:%M%P"),"0")
| rename count as today 
| fields - _time
|  appendcols [ 
    search index=_internal [
        |  stats count 
        |  eval now = now(), today=strftime(now,"%w")
        |  eval earliest = strftime(if(today=1,relative_time(now,"-3d@d+9h"),relative_time(now,"-1d@d+9h")),"%m/%d/%Y:%H:%M:%S")
        |  eval latest = strftime(if(today=1,relative_time(now,"-3d"),relative_time(now,"-1d")),"%m/%d/%Y:%H:%M:%S")
        | fields earliest, latest
    ] 
    |  timechart span=15m count
    | rename count as previous 
    | fields + previous
 ]
| table interval, today, previous
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Jan 2018 13:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328937#M163288</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-01-27T13:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328938#M163289</link>
      <description>&lt;P&gt;I thought about doing two reports.  Thanks,&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jan 2018 04:36:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328938#M163289</guid>
      <dc:creator>manapuna</dc:creator>
      <dc:date>2018-01-28T04:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328939#M163290</link>
      <description>&lt;P&gt;ok, well let me know if my answer helps you do it in one report.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jan 2018 23:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328939#M163290</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-01-28T23:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from Yesterday and today without Weekend</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328940#M163291</link>
      <description>&lt;P&gt;Thank you.   Yours is good.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 01:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-data-from-Yesterday-and-today-without-Weekend/m-p/328940#M163291</guid>
      <dc:creator>manapuna</dc:creator>
      <dc:date>2018-01-29T01:50:10Z</dc:date>
    </item>
  </channel>
</rss>

