<?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 display 0 in a timechart table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589091#M205156</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=toto 
| bin span=1h _time  
| stats count as Pb by s _time 
| search Pb &amp;gt;= 3 
| timechart dc(s) as s span=1h 
| where _time &amp;lt; now() 
| eval time = strftime(_time, "%H:%M") 
| stats sum(s) as nbs by time 
| rename time as Heure
| appendpipe [| stats count | where count=0  | eval t=mvrange(0, 24,1) | table t | mvexpand t | eval Heure=substr("0".t,-2) | fields - t| eval nbs=0]&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 15 Mar 2022 13:17:50 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2022-03-15T13:17:50Z</dc:date>
    <item>
      <title>How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588597#M205005</link>
      <description>&lt;P&gt;hello&lt;/P&gt;
&lt;P&gt;I count results by _time in a table panel like this and it works perfectly&lt;/P&gt;
&lt;P&gt;When the results is 0 the result is displayed only once there is a result on the bin _time after&lt;/P&gt;
&lt;P&gt;For example, if at 7h, the result is = 0 but at 8h the result is = 1, the results for 7h and 8h are correctly displayed&lt;/P&gt;
&lt;P&gt;But as long as the result is 0, nothing is displayed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=toto 
| bin span=1h _time  
| stats count as Pb by s _time 
| search Pb &amp;gt;= 3 
| timechart dc(s) as s span=1h 
| where _time &amp;lt; now() 
| eval time = strftime(_time, "%H:%M") 
| stats sum(s) as nbs by time 
| rename time as Heure&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so I tried this for displaying results = 0 but it doesnt works&lt;/P&gt;
&lt;P&gt;could you help please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval nbs =if(isnull(nbs, 0, nbs)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 04:39:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588597#M205005</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-15T04:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: help to display 0 in a timechart table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588669#M205014</link>
      <description>&lt;P&gt;You're doing some strange things here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Firstly, if you're binning to a full hour, why strftime with minutes? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Secondly, I'm not sure what you're trying to achieve. Especially with that _time condition - it should be part of the base search.&lt;/P&gt;&lt;P&gt;Can you be a bit more specific what is the goal of this search?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 11:03:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588669#M205014</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-11T11:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: help to display 0 in a timechart table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588710#M205019</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Because I need to display minutes after hour...&lt;/P&gt;&lt;P&gt;Like I said, O is displayed in my table only when there is events on a previous time or an anterior time&lt;/P&gt;&lt;P&gt;for example if at 7h00 there is no event I must wait to have events at 8h00 for having a result = 0 at 7h&lt;/P&gt;&lt;P&gt;Or to have events at 6h00 for having a result = 0 at 7h00&lt;/P&gt;&lt;P&gt;So I am looking for a solution in order to be able to display a result = 0 without wainting a time span with events &amp;gt; 0&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 11:44:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588710#M205019</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-11T11:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: help to display 0 in a timechart table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588713#M205021</link>
      <description>&lt;P&gt;OK, you could have just put a static ":00" since your timestamps are aligned to full hour but this way it will also work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And about my question what you're trying to do I meant what you're trying to get from your search as a whole. Not what particular technical obstacle you're trying to overcome but what is the "high-level" goal of this search. I mean - what type of report you want to get at the end. What is it supposed to show?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 12:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588713#M205021</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-11T12:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: help to display 0 in a timechart table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588725#M205024</link>
      <description>&lt;P&gt;here is what I display&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_0-1647002928554.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18449iC735A1B781175578/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_0-1647002928554.png" alt="jip31_0-1647002928554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;following this example, what I try to explain is that when the nbs field result is 0 I need that the posterior field has a result value in order to display the anterior field which is equal to 0&lt;/P&gt;&lt;P&gt;Imagine that all fields will be equal to 0, it means that there will be any value in my table, just the message "any results"&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 12:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588725#M205024</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-11T12:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: help to display 0 in a timechart table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588744#M205031</link>
      <description>&lt;P&gt;Like this it's almost working except I ave no time displayed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| appendpipe 
    [ stats count as _events 
    | where _events = 0 
    | eval nbs = 0 ]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 11 Mar 2022 14:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588744#M205031</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-11T14:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588817#M205058</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=toto 
| bin span=1h _time  
| stats count as Pb by s _time 
| search Pb &amp;gt;= 3 
| timechart dc(s) as nbs span=1h 
| eval Heure = strftime(_time, "%H:%M") 
| table Heure nbs | fillnull value=0&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 11 Mar 2022 20:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588817#M205058</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-11T20:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588875#M205087</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;sorry but any results are displayed&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 06:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/588875#M205087</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-14T06:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589010#M205128</link>
      <description>&lt;P&gt;Is anybody can help please?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 04:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589010#M205128</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-15T04:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589091#M205156</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=toto 
| bin span=1h _time  
| stats count as Pb by s _time 
| search Pb &amp;gt;= 3 
| timechart dc(s) as s span=1h 
| where _time &amp;lt; now() 
| eval time = strftime(_time, "%H:%M") 
| stats sum(s) as nbs by time 
| rename time as Heure
| appendpipe [| stats count | where count=0  | eval t=mvrange(0, 24,1) | table t | mvexpand t | eval Heure=substr("0".t,-2) | fields - t| eval nbs=0]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Mar 2022 13:17:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589091#M205156</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-15T13:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 in a timechart table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589224#M205195</link>
      <description>&lt;P&gt;it's a little better it misses 2 things&lt;/P&gt;&lt;P&gt;1) the "Heure" format is not good because I need a display in hour minutes (07:00 instead 07)&lt;/P&gt;&lt;P&gt;2) I just need to display result=0 for the Heure corresponding to the system time (if the system time is 07:00 I need to display 0 only fo 7:00 and not 8:00)&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 06:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-in-a-timechart-table/m-p/589224#M205195</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-16T06:56:32Z</dc:date>
    </item>
  </channel>
</rss>

