<?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 Getting count of data by days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462301#M130323</link>
    <description>&lt;P&gt;Hi guys! I am looking to get the number of tickets that are completed in under 14 days, 30 days, 45 days and 45+ days by month. I am gauging this from when the ticket is assigned to completion. Below is what I have so far but I am not sure how to actually get there. I get columns but getting a '0' as my total. I only have been testing with Less than 14 days. Status=5 = Complete&lt;/P&gt;

&lt;P&gt;index=remedy source=srmwo ASGRP="Packaging" Status="5"&lt;BR /&gt;
| dedup Work_Order_ID &lt;BR /&gt;
| eval Month=strftime(Completed_Date,"%Y-%m (%b)")&lt;BR /&gt;
| eval Completion_Time=round((Completed_Date-Actual_Start_Date)/86400,0)&lt;BR /&gt;
| stats count(Completion_Time&amp;lt;14d) as Less_than_14 by Month&lt;/P&gt;

&lt;P&gt;I get my Months, Less_than_14 column but my data is at zero&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:48:02 GMT</pubDate>
    <dc:creator>tmanuel1</dc:creator>
    <dc:date>2020-09-30T04:48:02Z</dc:date>
    <item>
      <title>Getting count of data by days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462301#M130323</link>
      <description>&lt;P&gt;Hi guys! I am looking to get the number of tickets that are completed in under 14 days, 30 days, 45 days and 45+ days by month. I am gauging this from when the ticket is assigned to completion. Below is what I have so far but I am not sure how to actually get there. I get columns but getting a '0' as my total. I only have been testing with Less than 14 days. Status=5 = Complete&lt;/P&gt;

&lt;P&gt;index=remedy source=srmwo ASGRP="Packaging" Status="5"&lt;BR /&gt;
| dedup Work_Order_ID &lt;BR /&gt;
| eval Month=strftime(Completed_Date,"%Y-%m (%b)")&lt;BR /&gt;
| eval Completion_Time=round((Completed_Date-Actual_Start_Date)/86400,0)&lt;BR /&gt;
| stats count(Completion_Time&amp;lt;14d) as Less_than_14 by Month&lt;/P&gt;

&lt;P&gt;I get my Months, Less_than_14 column but my data is at zero&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462301#M130323</guid>
      <dc:creator>tmanuel1</dc:creator>
      <dc:date>2020-09-30T04:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting count of data by days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462302#M130324</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/53998"&gt;@tmanuel1&lt;/a&gt;  can you post a desensitized an example of the log for a Work_Order_ID &lt;BR /&gt;
index=remedy source=srmwo ASGRP="Packaging" Work_Order_ID = "INSERT VAL" &lt;/P&gt;

&lt;P&gt;Key information needed need is: &lt;BR /&gt;
- Does each entry contain the first entry date ? &lt;BR /&gt;
- What defines it as completed ? &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462302#M130324</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-09-30T04:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting count of data by days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462303#M130325</link>
      <description>&lt;P&gt;A Work_Order_ID is identified a number such as WO0000003336389 &lt;BR /&gt;
I dedup the Work_Order_ID because there tends to be some duplicates if I don't&lt;BR /&gt;
A completed Work Order has the Status of 5 and there is a Completed_Date&lt;BR /&gt;
A assigned Work Order has a Status of 4 and there is a Actual_Start_Date&lt;/P&gt;

&lt;P&gt;I hope that is what you are asking and Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462303#M130325</guid>
      <dc:creator>tmanuel1</dc:creator>
      <dc:date>2020-09-30T04:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting count of data by days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462304#M130326</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=remedy source=srmwo ASGRP="Packaging" (Status=5 OR Status=4)
| eval date=coalesce(Completed_Date,Actual_Start_Date)
| table date Work_Order_ID
| bin span=1d date
| reverse
| streamstats values(date) as range  by Work_Order_ID
| reverse
| eval start=mvindex(range,0), end=mvindex(range,1)
| streamstats current=f values(start) as start_p1 by Work_Order_ID
| eval end=if(start=start_p1,null(),end)
| eval timerange=if(isnull(end),start,mvrange(start,end,86400))
| fields Work_Order_ID timerange
| mvexpand timerange
| rename timerange as _time
| table _time Work_Order_ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This query makes daily log by each Work_Order_ID.&lt;BR /&gt;
After this, let's aggregate what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-count-of-data-by-days/m-p/462304#M130326</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-09-30T04:51:30Z</dc:date>
    </item>
  </channel>
</rss>

