<?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 show the line when its value is  NULL with chart command / chartコマンドで行の値が0の時表示する方法 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-line-when-its-value-is-NULL-with-chart-command/m-p/747169#M241773</link>
    <description>&lt;P&gt;There are several ways to do this. &amp;nbsp;A traditional method is to backfill every day.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (index1, index2, index3, index4)
| bin span=1d _time
| chart count _time over index
| append
    [ makeresults
    | timechart span=1d@d count
    | fields - count]
| stats values(*) as * by _time
| fillnull&lt;/LI-CODE&gt;&lt;P&gt;Note I replaced your last line with &lt;A href="https://help.splunk.com/en/splunk-enterprise/search/spl-search-reference/latest/search-commands/fillnull" target="_blank" rel="noopener"&gt;fillnull&lt;/A&gt;. (This command is worth learning.)&lt;/P&gt;&lt;P&gt;Another somewhat sneaky way to do this depends on the real stats you perform. &amp;nbsp;If it is simple stats such as count, you can just "sneak in" something that always have some value, such as index _internal.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (index1, index2, index3, index4, _internal)
| bin span=1d _time
| chart count _time over index
| fields - VALUE_internal
| fillnull&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 29 May 2025 05:22:46 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2025-05-29T05:22:46Z</dc:date>
    <item>
      <title>How to show the line when its value is  NULL with chart command / chartコマンドで行の値が0の時表示する方法</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-line-when-its-value-is-NULL-with-chart-command/m-p/745425#M241436</link>
      <description>&lt;P&gt;Hi, I try to display the number of events per day from multiple indexes.&lt;/P&gt;&lt;P&gt;I wrote the below SPL, but when all index values are null for a specific date, the line itself is not displayed.&lt;/P&gt;&lt;P&gt;複数のindexから、nullには0を代入し、1日ごとのイベント件数を表示させたいです。&lt;/P&gt;&lt;P&gt;chartコマンドを使いイベント件数を表示、特定indexの値がnullの場合はisnullで0を代入できたのですが、特定の日にちだけ全てのindexの値がnullの時、その日の行自体が表示されません。&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (index1, index2, index3, index4)
| bin span=1d _time
| chart count _time over index
| eval index4=if(isnull(index4), 0, index4)&lt;/LI-CODE&gt;&lt;P&gt;How to display a line of 4/2 by substituting 0 like the below table, when all indexes value of 4/2 are null?&lt;/P&gt;&lt;P&gt;下記の表のように4/2の値がなくとも、０を代入して4/2の行を表示させる方法はないでしょうか。&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;index1&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;index2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;index3&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;index4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;4/1&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;12&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;45&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;4/2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;4/3&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;16&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;7&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;34&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 03 May 2025 06:44:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-line-when-its-value-is-NULL-with-chart-command/m-p/745425#M241436</guid>
      <dc:creator>mint_choco</dc:creator>
      <dc:date>2025-05-03T06:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the line when its value is  NULL with chart command / chartコマンドで行の値が0の時表示する方法</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-line-when-its-value-is-NULL-with-chart-command/m-p/747169#M241773</link>
      <description>&lt;P&gt;There are several ways to do this. &amp;nbsp;A traditional method is to backfill every day.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (index1, index2, index3, index4)
| bin span=1d _time
| chart count _time over index
| append
    [ makeresults
    | timechart span=1d@d count
    | fields - count]
| stats values(*) as * by _time
| fillnull&lt;/LI-CODE&gt;&lt;P&gt;Note I replaced your last line with &lt;A href="https://help.splunk.com/en/splunk-enterprise/search/spl-search-reference/latest/search-commands/fillnull" target="_blank" rel="noopener"&gt;fillnull&lt;/A&gt;. (This command is worth learning.)&lt;/P&gt;&lt;P&gt;Another somewhat sneaky way to do this depends on the real stats you perform. &amp;nbsp;If it is simple stats such as count, you can just "sneak in" something that always have some value, such as index _internal.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (index1, index2, index3, index4, _internal)
| bin span=1d _time
| chart count _time over index
| fields - VALUE_internal
| fillnull&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 May 2025 05:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-line-when-its-value-is-NULL-with-chart-command/m-p/747169#M241773</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-05-29T05:22:46Z</dc:date>
    </item>
  </channel>
</rss>

