<?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: Difference between today's and yesterday's data. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403718#M116821</link>
    <description>&lt;P&gt;for something like this a lookup might be better imho&lt;/P&gt;

&lt;P&gt;another way to do it is maybe to search for the last couple of days, then check in how many unique days an ID appears&lt;BR /&gt;
if 1 day, then it was hired that day, if greater, then one, it was there yesterday&lt;/P&gt;

&lt;P&gt;something like this:&lt;BR /&gt;
&lt;CODE&gt;... index="ABCD" Employee_number=* | bin _time span=24h | stats dc(Employee_number) as new_or_not by _time &lt;BR /&gt;
| eval new_or_not = if(new_or_not=="1","New Person","Long Time Employee") ...&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 20:03:00 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2019-07-22T20:03:00Z</dc:date>
    <item>
      <title>Difference between today's and yesterday's data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403717#M116820</link>
      <description>&lt;P&gt;I am trying to find the difference between today and yesterday's data. The data consists of every employee's Id number and first/last name. So I just want to know if the company hired within the last day. This is the search query that I currently have. Does the "earliest" and "latest" format make sense (like the -1d@d). Also, if there is not a difference between the two days, how do I have Splunk display a chart that says, "No diff."? Thanks.&lt;/P&gt;

&lt;P&gt;| set diff &lt;BR /&gt;
    [ search index="ABCD" (earliest=@d) &lt;BR /&gt;
    | table Employee_number First_name Last_name] &lt;BR /&gt;
    [ search index="ABCD" (earliest=-1d@d latest=@d-1) &lt;BR /&gt;
    | table Employee_number First_name Last_name]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403717#M116820</guid>
      <dc:creator>3666142</dc:creator>
      <dc:date>2020-09-30T01:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between today's and yesterday's data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403718#M116821</link>
      <description>&lt;P&gt;for something like this a lookup might be better imho&lt;/P&gt;

&lt;P&gt;another way to do it is maybe to search for the last couple of days, then check in how many unique days an ID appears&lt;BR /&gt;
if 1 day, then it was hired that day, if greater, then one, it was there yesterday&lt;/P&gt;

&lt;P&gt;something like this:&lt;BR /&gt;
&lt;CODE&gt;... index="ABCD" Employee_number=* | bin _time span=24h | stats dc(Employee_number) as new_or_not by _time &lt;BR /&gt;
| eval new_or_not = if(new_or_not=="1","New Person","Long Time Employee") ...&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 20:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403718#M116821</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-07-22T20:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between today's and yesterday's data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403719#M116822</link>
      <description>&lt;P&gt;Thank you. That definitely put me in the right direction. &lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:30:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-today-s-and-yesterday-s-data/m-p/403719#M116822</guid>
      <dc:creator>3666142</dc:creator>
      <dc:date>2019-07-23T16:30:50Z</dc:date>
    </item>
  </channel>
</rss>

