<?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: Why are different search panels returning inconsistent results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248692#M74272</link>
    <description>&lt;P&gt;In the third search, the uniquetotal field is calculated for whole period, not per day, how would it be comparable with total count per day query? Should you be comparing both counts on day-by-day basis like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logs.stats/tcp/10057" message_type="Log"  | timechart span=1d count(log_id) as totalCount dc(log_id) as uniquetotal  | eval dupCount = totalCount-uniquetotal
  | table _time totalCount dupCount uniquetotal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 21 Jan 2017 20:50:55 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-01-21T20:50:55Z</dc:date>
    <item>
      <title>Why are different search panels returning inconsistent results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248691#M74271</link>
      <description>&lt;P&gt;I have a timeline panel that gives the count of the different message types for the last 7 days. Another panel provides the unique count of one type of message over 7 days. The third type is supposed to show the number of messages that have duplicates and this should be as simple as the difference between the two panels for one type of message. i.e&lt;/P&gt;

&lt;P&gt;Total Message A - Unique Count Message A = Duplicate Count Message A&lt;/P&gt;

&lt;P&gt;However no matter how I have reconstructed the searches and panel, I cannot get the numbers to coincide. I have got fantastic help from people on this forum with the searches but just want to perhaps understand why there is a difference and if there is a fix.&lt;/P&gt;

&lt;P&gt;eg.&lt;/P&gt;

&lt;P&gt;Panel 1 (different types counts)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="logs.stats" | timechart count by message_type | fields _time Log Report Thread
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for example yesterdays count for Log = 1947075&lt;/P&gt;

&lt;P&gt;Panel 2 (unique count for type message Log)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logs.stats/tcp/10057" message_type="Log"|  timechart dc(log_id)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for example yesterdays unique count = 856790&lt;/P&gt;

&lt;P&gt;Panel 3 (duplicate count for type message Log)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logs.stats/tcp/10057" message_type="Log" | bucket _time span=day 
 | stats count(log_id) as totalCount by _time
 | appendcols [ search 
    source="/logs.stats/tcp/10057" message_type="Log" 
    | bucket _time span=day 
    | eventstats dc(Log_id) as uniquetotal | eventstats count as duplicates by log_id| stats count(eval(duplicates=1)) as duplicates values(uniquetotal) as uniquetotal
    ]                          
 | eval dupCount = totalCount-uniquetotal
 | table totalCount dupCount uniquetotal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These totals = totalCount  =3894252 ; dupCount =3565952  ;  uniquetotal=  328300 ;&lt;/P&gt;

&lt;P&gt;As you can see the numbers are complete off. Any ideas appreciated&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 09:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248691#M74271</guid>
      <dc:creator>jdepp</dc:creator>
      <dc:date>2017-01-21T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why are different search panels returning inconsistent results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248692#M74272</link>
      <description>&lt;P&gt;In the third search, the uniquetotal field is calculated for whole period, not per day, how would it be comparable with total count per day query? Should you be comparing both counts on day-by-day basis like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logs.stats/tcp/10057" message_type="Log"  | timechart span=1d count(log_id) as totalCount dc(log_id) as uniquetotal  | eval dupCount = totalCount-uniquetotal
  | table _time totalCount dupCount uniquetotal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Jan 2017 20:50:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248692#M74272</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-21T20:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why are different search panels returning inconsistent results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248693#M74273</link>
      <description>&lt;P&gt;Is &lt;CODE&gt;capitalization&lt;/CODE&gt; messing it up, if this is your exact query.. stats count( &lt;CODE&gt;log_id&lt;/CODE&gt; ) as totalCount vs. eventstats dc( &lt;CODE&gt;Log_id&lt;/CODE&gt; ) as uniquetotal??&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 21:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248693#M74273</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-01-21T21:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why are different search panels returning inconsistent results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248694#M74274</link>
      <description>&lt;P&gt;sorry that was just a type-o copy and paste&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-different-search-panels-returning-inconsistent-results/m-p/248694#M74274</guid>
      <dc:creator>jdepp</dc:creator>
      <dc:date>2017-01-22T11:18:40Z</dc:date>
    </item>
  </channel>
</rss>

