<?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 find the difference in count between stats and timechart command? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622221#M51063</link>
    <description>&lt;P&gt;I understand this .But I am using data warehouse view as source for the sourcetype using db connect .&lt;/P&gt;&lt;P&gt;It will have a static value for a particular day .But I am not sure why I am seeing difference between stats and timechart .&lt;/P&gt;&lt;P&gt;When I select yesterday in timechart it shows exact match with stats count .But when I select more than one day it shows difference .&lt;/P&gt;&lt;P&gt;It's strange but this is what iam getting .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 03:39:32 GMT</pubDate>
    <dc:creator>dtccsundar</dc:creator>
    <dc:date>2022-11-28T03:39:32Z</dc:date>
    <item>
      <title>Seeing  difference in count between stats and timechart command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622077#M51057</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am facing difference in count between stats and timechart for same search and same filters&lt;/P&gt;&lt;P&gt;Stats cmd : Last 24 hours&lt;/P&gt;&lt;P&gt;search|bin span=1d _time |stats count by Status|eventstats sum(*) as sum_* |foreach * [eval "Comp %"=round((count/sum_count)*100,2)]|rename count as Count|fields - sum_count&lt;/P&gt;&lt;TABLE width="128"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;comp&amp;nbsp;&lt;/TD&gt;&lt;TD width="64"&gt;7126&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;error&lt;/TD&gt;&lt;TD&gt;37&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Noncomp&lt;/TD&gt;&lt;TD&gt;146&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NonRep&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;7363&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Timechart :&amp;nbsp; Last 30 days&amp;nbsp;&lt;/P&gt;&lt;P&gt;search|bin span=1d _time |timechart count by Status| addtotals| eval "Comp %"=round((Comp/Total)*100,2) | eval "Error %"=round((Error/Total)*100,2) | eval "Noncomp %"=round((Noncomp/Total)*100,2) | eval "NonRep %"=round((NonRep/Total)*100,2) | fields _time,*%&lt;/P&gt;&lt;TABLE width="128"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;comp&amp;nbsp;&lt;/TD&gt;&lt;TD width="64"&gt;7126&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;error&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Noncomp&lt;/TD&gt;&lt;TD&gt;146&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NonRep&lt;/TD&gt;&lt;TD&gt;53&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;7361&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;There is difference in count by 2 between these 2 functions.I am using a macro before the time chart or stats .Please help me with solution or cause of this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 05:36:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622077#M51057</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2022-11-28T05:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the difference in count between stats and timechart command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622215#M51060</link>
      <description>&lt;P&gt;Your searches and your data examples don't seem to correlate.&lt;/P&gt;&lt;P&gt;Firstly you are not splitting by _time in your stats, so the stats command will give you a single set of stats by Status for the last 24 hours. Your bin _time is redundant. If you want to use bin with stats, you need to also use _time in the by clause, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats count by _time Status&lt;/LI-CODE&gt;&lt;P&gt;Depending on when you are running the search and if the latest part of the search is anchored to a fixed time, it will vary every time you run it.&lt;/P&gt;&lt;P&gt;Your timechart search is producing percentage values, not counts.&lt;/P&gt;&lt;P&gt;Can you clarify exactly what your earliest and latest search criteria are for these two searches&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 22:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622215#M51060</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-27T22:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the difference in count between stats and timechart command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622216#M51061</link>
      <description>&lt;P&gt;I am not using earliest and latest in search .&lt;/P&gt;&lt;P&gt;But my requirement is for last 24 hours for stats and last 30 days for timechart .For time chart it will be selected in filter .&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 00:32:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622216#M51061</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2022-11-28T00:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the difference in count between stats and timechart command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622220#M51062</link>
      <description>&lt;P&gt;Every search has an earliest and latest time range - it's a fundamental requirement for any search. It's either set by a time picker of specified in the search directly.&lt;/P&gt;&lt;P&gt;Last 24 hours in Splunk will typically mean -24h@h to "now", so it will be somewhere between 24 and 25 hours whereas your timechart will be working on day boundaries, because you have defined the time group to be a span of 1 day, so will be from midnight to midnight.&lt;/P&gt;&lt;P&gt;You need to make sure you are comparing comparable time ranges. "Last 24 hours" will never be the same time range as a 30 day time range&lt;/P&gt;&lt;P data-unlink="true"&gt;If you want "last 24 hours" to mean "yesterday", then your time range needs to be -d@d&amp;nbsp; for the earliest time and&amp;nbsp;@d for the latest time range in the time picker&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 02:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622220#M51062</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-28T02:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the difference in count between stats and timechart command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622221#M51063</link>
      <description>&lt;P&gt;I understand this .But I am using data warehouse view as source for the sourcetype using db connect .&lt;/P&gt;&lt;P&gt;It will have a static value for a particular day .But I am not sure why I am seeing difference between stats and timechart .&lt;/P&gt;&lt;P&gt;When I select yesterday in timechart it shows exact match with stats count .But when I select more than one day it shows difference .&lt;/P&gt;&lt;P&gt;It's strange but this is what iam getting .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 03:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Seeing-difference-in-count-between-stats-and-timechart-command/m-p/622221#M51063</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2022-11-28T03:39:32Z</dc:date>
    </item>
  </channel>
</rss>

