<?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: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231951#M68817</link>
    <description>&lt;P&gt;Do you have the holiday lookup containing dates of holidays??&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2016 21:38:11 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-01-13T21:38:11Z</dc:date>
    <item>
      <title>excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231950#M68816</link>
      <description>&lt;P&gt;I need to get a count of possible days an event could be happening while excluding weekends and holidays, for example&lt;/P&gt;

&lt;P&gt;index=physical date_wday!="saturday" date_wday!="sunday"&lt;BR /&gt;&lt;BR /&gt;
| WHERE holiday!=*&lt;BR /&gt;
| eval day_of_swipe=(date_month + " "+ date_mday + " "+  date_wday )&lt;BR /&gt;&lt;BR /&gt;
| stats count(dvc_name) as swipes_per_day by user,day_of_swipe&lt;BR /&gt;&lt;BR /&gt;
| eventstats dc(day_of_swipe) as work_days&lt;BR /&gt;
| eventstats dc(day_of_swipe) as days_swiped by nick &lt;BR /&gt;
| eval perc_present=round((days_swiped/work_days*100))&lt;/P&gt;

&lt;P&gt;eventstats is giving me the total number of days being search and not the excluded, I need to get the total number of possible working days m-f and excluding any holidays are being identified with a lookup table and filtered &lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231950#M68816</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2020-09-29T08:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231951#M68817</link>
      <description>&lt;P&gt;Do you have the holiday lookup containing dates of holidays??&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 21:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231951#M68817</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-13T21:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231952#M68818</link>
      <description>&lt;P&gt;I do and it is working correctly.&lt;/P&gt;

&lt;P&gt;holidays.csv&lt;/P&gt;

&lt;P&gt;holiday,type,holiday_description&lt;BR /&gt;
25-12-2015,global,christmas&lt;BR /&gt;
16-02-2015,global,presidents day&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[holidays]&lt;BR /&gt;
filename = holidays.csv&lt;BR /&gt;
min_matches = 1&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
EVAL-holiday = strftime(_time,"%d-%m-%Y")&lt;BR /&gt;
LOOKUP-isaholiday = holidays holiday OUTPUTNEW&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 22:29:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231952#M68818</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-01-13T22:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231953#M68819</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=physical date_wday!="saturday" date_wday!="sunday" 
| eval Date=strftime(_time,"%d-%m-%Y") | search NOT [| inputlookup holidays.csv | table holiday | rename holiday as Date]
| eval day_of_swipe=(date_month + " "+ date_mday + " "+ date_wday ) 
| stats count(dvc_name) as swipes_per_day by user,day_of_swipe 
| eventstats dc(day_of_swipe) as work_days
| eventstats dc(day_of_swipe) as days_swiped by nick 
| eval perc_present=round((days_swiped/work_days*100))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jan 2016 22:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231953#M68819</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-13T22:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231954#M68820</link>
      <description>&lt;P&gt;EXCELLENT! Thank you kind sir.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231954#M68820</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-01-14T14:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: excluding holidays and weekends a count of days with events and a count of total days excluding weekends and holidays</title>
      <link>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231955#M68821</link>
      <description>&lt;P&gt;Bonus points if you can solve this one.&lt;/P&gt;

&lt;P&gt;I have my results which are correct for a single month span. I would like to run this against the previous year and see the results in 1 month buckets. Can you point me to a solution?&lt;/P&gt;

&lt;P&gt;Thank you!!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 16:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/excluding-holidays-and-weekends-a-count-of-days-with-events-and/m-p/231955#M68821</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-01-14T16:40:44Z</dc:date>
    </item>
  </channel>
</rss>

