<?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 edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285206#M86273</link>
    <description>&lt;P&gt;Thank You arobbins ,It worked with just a small change in my query&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2016 21:54:44 GMT</pubDate>
    <dc:creator>vrmandadi</dc:creator>
    <dc:date>2016-04-06T21:54:44Z</dc:date>
    <item>
      <title>How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285204#M86271</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to compare the count for Tuesday of last week with Tuesday of this week. I am currently using the below search to compare the results:&lt;/P&gt;

&lt;P&gt;index=&lt;EM&gt;d&lt;/EM&gt;   earliest=@w2 latest=now&lt;BR /&gt;
 | eval Period=if( _time&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 21:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285204#M86271</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-04-06T21:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285205#M86272</link>
      <description>&lt;P&gt;how about:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-14d date_wday="tuesday"
| eval day=date_month." ".date_mday
| stats count by day
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;by putting the filtering for date_wday in the initial search, you won't retrieve any extraneous events&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 21:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285205#M86272</guid>
      <dc:creator>arobbins_splunk</dc:creator>
      <dc:date>2016-04-06T21:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285206#M86273</link>
      <description>&lt;P&gt;Thank You arobbins ,It worked with just a small change in my query&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 21:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285206#M86273</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-04-06T21:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285207#M86274</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;timewrap&lt;/CODE&gt; app:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1645/"&gt;https://splunkbase.splunk.com/app/1645/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 22:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285207#M86274</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-06T22:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285208#M86275</link>
      <description>&lt;P&gt;Give this a try (check the rex messages)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=d " earliest=-14d date_wday=Tuesday
| eval day=if(_time&amp;gt;relative_time(now(),"-7d"),"ThisWeek","LastWeek")
 | rex field=EWS_MESSAGE_QUALIFIER "(?\w+)" | rex field=ews_transaction_log.ews_message_qualifier "(?\w+)" 
 | chart count by MESSAGE_TYPE,day
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If date_wday is not already present&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=d " earliest=-14d@d | where strftime(_time,"%a")="Tue"     | eval day=if(_time&amp;gt;relative_time(now(),"-7d"),"ThisWeek","LastWeek")
 | rex field=EWS_MESSAGE_QUALIFIER "(?\w+)" | rex field=ews_transaction_log.ews_message_qualifier "(?\w+)" 
 | chart count by MESSAGE_TYPE,day
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Apr 2016 22:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285208#M86275</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-06T22:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285209#M86276</link>
      <description>&lt;P&gt;It worked thanks a lot,but please explain me &lt;/P&gt;

&lt;P&gt;what will this below search does &lt;/P&gt;

&lt;P&gt;eval day=if(_time&amp;gt;relative_time(now(),"-7d")&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285209#M86276</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2020-09-29T09:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare the count for Tuesday of the present week with Tuesday of the previous week?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285210#M86277</link>
      <description>&lt;P&gt;This is differentiating between two Tuesday that you'll get in the results. If the timestamp of the events is within last 7 days they are from the Tuesday just passed.  If you run the query on or after Wednesday it'll give Tuesday of current week else it will give Tuesday of last week.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 22:29:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-the-count-for-Tuesday-of-the/m-p/285210#M86277</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-06T22:29:39Z</dc:date>
    </item>
  </channel>
</rss>

