<?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 count dates of a field that are over now() and Values with no entry? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505299#M2088</link>
    <description>&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Organization,System,Scan_Due_Date
ABC,Jack,1418459200
ABC,Jill,1593547277
123,Bob,Unspecified
123,Alicez,Unspecified
456,James,1625083277"
| multikv forceheader=1
| table Organization,System,Scan_Due_Date
| rename COMMENT as "the logic"
| eval status=case(Scan_Due_Date &amp;gt;= now(),"Not Expired",Scan_Due_Date="Unspecified",Scan_Due_Date,true(),"Overdue")
| stats count by status&lt;/LI-CODE&gt;&lt;P&gt;try Visualization &amp;gt;&amp;gt; Pie Chart&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jun 2020 00:11:10 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-06-20T00:11:10Z</dc:date>
    <item>
      <title>How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505272#M2082</link>
      <description>&lt;P&gt;I have a CSV that looks like the following:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="36.99248120300752%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%" height="43px"&gt;Organization&lt;/TD&gt;&lt;TD width="10%" height="43px"&gt;System&amp;nbsp;&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="43px"&gt;Scan Due&amp;nbsp; Date&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="43px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="22px"&gt;ABC&lt;/TD&gt;&lt;TD width="10%" height="22px"&gt;Jack&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="22px"&gt;7-Feb-21&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="22px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="22px"&gt;ABC&lt;/TD&gt;&lt;TD width="10%" height="22px"&gt;Jill&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="22px"&gt;9-May-20&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="22px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="22px"&gt;123&lt;/TD&gt;&lt;TD width="10%" height="22px"&gt;Bob&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="22px"&gt;&lt;SPAN&gt;Unspecified&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="22px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="22px"&gt;123&lt;/TD&gt;&lt;TD width="10%" height="22px"&gt;Alice&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="22px"&gt;&lt;SPAN&gt;Unspecified&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="22px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="22px"&gt;456&lt;/TD&gt;&lt;TD width="10%" height="22px"&gt;James&lt;/TD&gt;&lt;TD width="3.115264797507788%" height="22px"&gt;10-Jan-21&lt;/TD&gt;&lt;TD width="16.884735202492212%" height="22px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;How do I do a count of the " Scan Due Date Field" that shows all of the events that are Overdue, Not Expired, and&amp;nbsp;&lt;SPAN&gt;Unspecified? ( I want to eventually&amp;nbsp;want to put the results of that search&amp;nbsp;into a pie chart.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505272#M2082</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-06-22T20:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505280#M2085</link>
      <description>How do you define "Overdue" and "Not Expired"?</description>
      <pubDate>Fri, 19 Jun 2020 21:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505280#M2085</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-06-19T21:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505299#M2088</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Organization,System,Scan_Due_Date
ABC,Jack,1418459200
ABC,Jill,1593547277
123,Bob,Unspecified
123,Alicez,Unspecified
456,James,1625083277"
| multikv forceheader=1
| table Organization,System,Scan_Due_Date
| rename COMMENT as "the logic"
| eval status=case(Scan_Due_Date &amp;gt;= now(),"Not Expired",Scan_Due_Date="Unspecified",Scan_Due_Date,true(),"Overdue")
| stats count by status&lt;/LI-CODE&gt;&lt;P&gt;try Visualization &amp;gt;&amp;gt; Pie Chart&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 00:11:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505299#M2088</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-20T00:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505540#M2108</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Overdue (Expired) means the "Scan Due&amp;nbsp; Date" is a past date.&lt;BR /&gt;Not-Expired means the "Scan Due Date" is a date sometime in the future.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 16:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505540#M2108</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-06-22T16:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505592#M2120</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I put a strptime in and got it partially&amp;nbsp;working:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup scan_due_date.csv
|  eval date = strptime('Scan Date', "%d-%b-%y")
| eval status=case(date &amp;gt;= now(),"Not Expired",date="Unspecified",date true(),"Overdue")
| stats count by status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;However, it's not counting the "Unspecified" field values.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 19:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/505592#M2120</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-06-22T19:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to count dates of a field that are over now() and Values with no entry?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/506023#M2182</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup scan_due_date.csv
| eval date = strptime('Scan Date', "%d-%b-%Y")
| eval duedate = if(isnull(date) OR date="", "Unspecified", date)
| eval status=case(duedate &amp;gt;= now(),"Not Expired",duedate="Unspecified",duedate true(),"Overdue")
| fields date duedate status
| stats count by status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Okay, figured it out. I had to convert the date using strptime using a capital "%Y" (Capital "%Y" is needed to convert "2020", lowercase "%y" would only work with "20"). Because striptime fills in "Unspecified" with blanks/null values, I had to do an eval "if" statement to fill in the blanks strptime created with "Unspecified" to bring it back.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 18:59:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-count-dates-of-a-field-that-are-over-now-and-Values-with/m-p/506023#M2182</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-06-25T18:59:57Z</dc:date>
    </item>
  </channel>
</rss>

