<?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: command stats with full table even if null values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174837#M50172</link>
    <description>&lt;P&gt;Hi loyslegrand,&lt;/P&gt;

&lt;P&gt;take this run everywhere example and adapt it to your needs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal foo earliest=-30d | timechart span="1d" count | eval date_mday=strftime(_time, "%d") | fields count date_mday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here the &lt;CODE&gt;timechart&lt;/CODE&gt; does most of what you want but the &lt;CODE&gt;date_mday&lt;/CODE&gt; is blank for dates with no data. The &lt;CODE&gt;eval&lt;/CODE&gt; will recreate this field and finally the &lt;CODE&gt;fields&lt;/CODE&gt; command cleans the result.&lt;/P&gt;

&lt;P&gt;hope this helps to get you started ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 22 May 2014 07:11:23 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-05-22T07:11:23Z</dc:date>
    <item>
      <title>command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174835#M50170</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Does anyone know how to get as output of a stats command a table with all values even when the result is null to avoid gaps in the table?&lt;/P&gt;

&lt;P&gt;" ..... | stats count by  date_mday Priority | xyseries date_mday Priority count | fillnull | sort+date_mday"&lt;/P&gt;

&lt;P&gt;If there is no entry for one day , the day is skipped.&lt;/P&gt;

&lt;P&gt;BRgds&lt;/P&gt;

&lt;P&gt;Loys&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174835#M50170</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2020-09-28T16:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174836#M50171</link>
      <description>&lt;P&gt;Add &lt;CODE&gt;fillnull&lt;/CODE&gt; before your &lt;CODE&gt;stats&lt;/CODE&gt; command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull date_mday | stats count ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 May 2014 07:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174836#M50171</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-05-22T07:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174837#M50172</link>
      <description>&lt;P&gt;Hi loyslegrand,&lt;/P&gt;

&lt;P&gt;take this run everywhere example and adapt it to your needs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal foo earliest=-30d | timechart span="1d" count | eval date_mday=strftime(_time, "%d") | fields count date_mday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here the &lt;CODE&gt;timechart&lt;/CODE&gt; does most of what you want but the &lt;CODE&gt;date_mday&lt;/CODE&gt; is blank for dates with no data. The &lt;CODE&gt;eval&lt;/CODE&gt; will recreate this field and finally the &lt;CODE&gt;fields&lt;/CODE&gt; command cleans the result.&lt;/P&gt;

&lt;P&gt;hope this helps to get you started ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 07:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174837#M50172</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-22T07:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174838#M50173</link>
      <description>&lt;P&gt;Do not work taimechart?&lt;BR /&gt;
..... | taimechart span=1d count by Priority&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 07:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174838#M50173</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2014-05-22T07:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174839#M50174</link>
      <description>&lt;P&gt;with fillnull, I have the same result as before &lt;BR /&gt;
Thanks&lt;BR /&gt;
Loys&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 09:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174839#M50174</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-05-22T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174840#M50175</link>
      <description>&lt;P&gt;Thanks , it works; as I wanted the count by Priority I have  entered :&lt;BR /&gt;
"index=_internal foo earliest=-30d | timechart span="1d" count by Priority | eval date_mday=strftime(_time, "%d")" &lt;BR /&gt;
the result is a full table including the null values&lt;/P&gt;

&lt;P&gt;Loys&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174840#M50175</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2020-09-28T16:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: command stats with full table even if null values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174841#M50176</link>
      <description>&lt;P&gt;nice, please mark this as answered by ticking the tick - thx &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 09:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-stats-with-full-table-even-if-null-values/m-p/174841#M50176</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-22T09:21:54Z</dc:date>
    </item>
  </channel>
</rss>

