<?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 How to compare data between two tables from 2 different time periods? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211323#M61802</link>
    <description>&lt;P&gt;I have a Splunk search that generates a table of errors.  Each row is an error entry.  I would like to compare the change of the entries from 2 time periods (24-48hrs ago vs last 24hrs) for spike in errors.  Is it possible to do so with Splunk? thanks&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2016 03:52:06 GMT</pubDate>
    <dc:creator>trunghung</dc:creator>
    <dc:date>2016-02-23T03:52:06Z</dc:date>
    <item>
      <title>How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211323#M61802</link>
      <description>&lt;P&gt;I have a Splunk search that generates a table of errors.  Each row is an error entry.  I would like to compare the change of the entries from 2 time periods (24-48hrs ago vs last 24hrs) for spike in errors.  Is it possible to do so with Splunk? thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 03:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211323#M61802</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2016-02-23T03:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211324#M61803</link>
      <description>&lt;P&gt;you can send your query ?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 09:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211324#M61803</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2016-02-23T09:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211325#M61804</link>
      <description>&lt;P&gt;HI&lt;BR /&gt;
try with two subsearches join with appendcols command.just complete the following search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;............. earliest=-(24-48)h | ..............|appendcols[search ............. earliest=-24h@h | ..............]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Feb 2016 09:38:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211325#M61804</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-02-23T09:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211326#M61805</link>
      <description>&lt;P&gt;So I tried &lt;/P&gt;

&lt;P&gt;index=tto* sourcetype=access "Get &lt;EM&gt;wtt_err&lt;/EM&gt; HTTP/1.1" NOT Error=111 earliest=-48h@h latest=-24h@h | dedup client_ip |  stats count by Error | sort count + | appendcols [search index=tto* sourcetype=access "Get &lt;EM&gt;wtt_err&lt;/EM&gt; HTTP/1.1" NOT Error=111 earliest=-24h@h latest=-0h@h | dedup client_ip | stats count by Error | sort count +]&lt;/P&gt;

&lt;P&gt;but it only show the data from the first query.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:51:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211326#M61805</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2020-09-29T08:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211327#M61806</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* sourcetype=access "Get wtt_err HTTP/1.1" NOT Error=111 earliest=-48h@h latest=now | dedup client_ip | eval Period=if(_time&amp;lt;relative_time(now(),"-24h@h"),"Prior","Current")| chart  count over Error by Period 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should give you 3 columns - Error, Current (Count for last 24 hr) , Prior (Count for lat 48hr to 24 hr)&lt;/P&gt;

&lt;P&gt;You can then compare your data for column Current and Prior. Rename the column after comparison to something more suitable for you.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update#1&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* sourcetype=access "Get wtt_err HTTP/1.1" NOT Error=111 earliest=-48h@h latest=-24h@h | dedup client_ip | stats count by Error| eval Period="Prior" | append [search index=tto* sourcetype=access "Get wtt_err HTTP/1.1" NOT Error=111 earliest=-24h@h latest=now | dedup client_ip | stats count by Error | eval Period="Current" ] | chart sum(count) over Error by Period
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Feb 2016 18:26:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211327#M61806</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-23T18:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211328#M61807</link>
      <description>&lt;P&gt;thanks for the suggestion.  I tried your query but it yielded no result.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 18:41:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211328#M61807</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2016-02-23T18:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211329#M61808</link>
      <description>&lt;P&gt;Strange.. it should've worked if the base search and the fieldnames are correct. Can you provide any sample working query for the same data? &lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 19:22:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211329#M61808</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-23T19:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211330#M61809</link>
      <description>&lt;P&gt;here is a working query:&lt;BR /&gt;
index=tto* sourcetype=access "Get wtt_err HTTP/1.1" NOT Error=111 earliest=-48h@h latest=-24h@h | dedup client_ip | stats count by Error | sort count +&lt;/P&gt;

&lt;P&gt;thank you for your help&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211330#M61809</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2020-09-29T08:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211331#M61810</link>
      <description>&lt;P&gt;Sorry, here is the query I try to use. thanks &lt;BR /&gt;
index=tto* sourcetype=access "Get wtt_err HTTP/1.1" NOT Error=111 earliest=-48h@h latest=-24h@h | dedup client_ip | stats count by Error | sort count +&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:52:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211331#M61810</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2020-09-29T08:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211332#M61811</link>
      <description>&lt;P&gt;It works now.  There was a minor type in the second part of the query.  Need to add the * around wtt_err.  thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 21:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211332#M61811</guid>
      <dc:creator>trunghung</dc:creator>
      <dc:date>2016-02-23T21:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare data between two tables from 2 different time periods?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211333#M61812</link>
      <description>&lt;P&gt;Hi somesoni2,&lt;/P&gt;

&lt;P&gt;thank you for your suggestion, it works great.  I have 1 last question, in some of my panels, I like to use the statistical table, but the rows aren't sort.  I tried | sort count or | sort sum(count) but it doesn't seem to work. Do you know how I can make it sorted? thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 01:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-data-between-two-tables-from-2-different-time/m-p/211333#M61812</guid>
      <dc:creator>Hung_Nguyen</dc:creator>
      <dc:date>2016-02-25T01:56:39Z</dc:date>
    </item>
  </channel>
</rss>

