<?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: display null event result (fillnull) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599846#M208796</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I tried your suggestion, putting fillnull before stats, but nothing, no result, the line doesn't show.&lt;BR /&gt;Tks&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 08:48:37 GMT</pubDate>
    <dc:creator>antonio147</dc:creator>
    <dc:date>2022-05-31T08:48:37Z</dc:date>
    <item>
      <title>How to display null event result (fillnull)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599841#M208792</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have an event display problem when no events matching the conditions are found.&lt;BR /&gt;I want to filter only those events that have the "DATA_LAVORAZIONE" (STC) field greater than "OGGI" up to 7 days ahead.&lt;BR /&gt;In the AMPLIAMENTI sourcetype there are some events for which it returns the sum, while in the DIRETTA sourcetype there are no events, and it does not show me anything.&lt;BR /&gt;I would like the row with all 0s to be displayed anyway.&lt;BR /&gt;I tried with fillnull value = 0 field, field, field .... but it doesn't work.&lt;BR /&gt;Also tried fulldown, but nothing.&lt;BR /&gt;Do you have any suggestions?&lt;BR /&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CODE:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index =DATI sourcetype = AMPLIAMENTI
|fields - _*
|eval OGGI=strftime(relative_time(now(),"-0d@d"), "%Y-%m-%d")
|eval OGGI_1=strftime(relative_time(now(),"+1d@d"), "%Y-%m-%d")
|eval OGGI_2=strftime(relative_time(now(),"+2d@d"), "%Y-%m-%d")
|eval OGGI_3=strftime(relative_time(now(),"+3d@d"), "%Y-%m-%d")
|eval OGGI_4=strftime(relative_time(now(),"+4d@d"), "%Y-%m-%d")
|eval OGGI_5=strftime(relative_time(now(),"+5d@d"), "%Y-%m-%d")
|eval OGGI_6=strftime(relative_time(now(),"+6d@d"), "%Y-%m-%d")
|eval OGGI_7=strftime(relative_time(now(),"+7d@d"), "%Y-%m-%d")
|eval STC=strftime(strptime(DATA_LAVORAZIONE, "%Y-%m-%d"), "%Y-%m-%d")
|where STC &amp;gt; OGGI
|eval X = if(STC=OGGI,1,0)
|eval X+1 = if(STC=OGGI_1,1,0)
|eval X+2 = if(STC=OGGI_2,1,0)
|eval X+3 = if(STC=OGGI_3,1,0)
|eval X+4 = if(STC=OGGI_4,1,0)
|eval X+5 = if(STC=OGGI_5,1,0)
|eval X+6 = if(STC=OGGI_6,1,0)
|eval X+7 = if(STC=OGGI_7,1,0)

|eval TOTALE=if(STC &amp;gt; OGGI AND STC &amp;lt;= OGGI_7,1,0)
|eval TUTTI=if(STC &amp;gt; OGGI ,1,0)
|sort - DATE_UPD, LINK
|dedup LINK
|where STATO IN("LAVORAZIONE", "CONFERMA DATA")

|stats sum(X) as X, sum(X+1) as X+1,sum(X+2) as X+2, sum(X+3) as X+3,sum(X+4) as X+4,sum(X+5) as X+5, sum(X+6) as X+6,sum(X+7) as X+7, sum(TOTALE) as TOTALE,sum(TUTTI) as OVER
|eval TIPOL ="AMPLIAMENTI"
|table TIPOL X X+1 X+2 X+3 X+4 X+5 X+6 X+7  TOTALE OVER

|append [ search index =DATI sourcetype = diretta
|fields - _*
|where TIPOLOGIA IN("SUBNET","VOCE")
|eval OGGI=strftime(relative_time(now(),"-0d@d"), "%Y-%m-%d")
|eval OGGI_1=strftime(relative_time(now(),"+1d@d"), "%Y-%m-%d")
|eval OGGI_2=strftime(relative_time(now(),"+2d@d"), "%Y-%m-%d")
|eval OGGI_3=strftime(relative_time(now(),"+3d@d"), "%Y-%m-%d")
|eval OGGI_4=strftime(relative_time(now(),"+4d@d"), "%Y-%m-%d")
|eval OGGI_5=strftime(relative_time(now(),"+5d@d"), "%Y-%m-%d")
|eval OGGI_6=strftime(relative_time(now(),"+6d@d"), "%Y-%m-%d")
|eval OGGI_7=strftime(relative_time(now(),"+7d@d"), "%Y-%m-%d")
|eval STC=strftime(strptime(DATA_LAVORAZIONE, "%Y-%m-%d"), "%Y-%m-%d")
|where STC &amp;gt; OGGI
|eval X = if(STC=OGGI,1,0)
|eval X+1 = if(STC=OGGI_1,1,0)
|eval X+2 = if(STC=OGGI_2,1,0)
|eval X+3 = if(STC=OGGI_3,1,0)
|eval X+4 = if(STC=OGGI_4,1,0)
|eval X+5 = if(STC=OGGI_5,1,0)
|eval X+6 = if(STC=OGGI_6,1,0)
|eval X+7 = if(STC=OGGI_7,1,0)
|eval TOTALE=if(STC &amp;gt; OGGI AND STC &amp;lt;= OGGI_7,1,0)
|eval TUTTI=if(STC &amp;gt; OGGI ,1,0)
|sort - DATE_UPD, LINK
|dedup LINK
|where STATO IN("CONFERMA DATA")
|stats sum(X) as X, sum(X+1) as X+1,sum(X+2) as X+2, sum(X+3) as X+3,sum(X+4) as X+4,sum(X+5) as X+5, sum(X+6) as X+6,sum(X+7) as X+7, sum(TOTALE) as TOTALE,sum(TUTTI) as OVER
|eval TIPOL ="SUBNET  - VOCE"
| fillnull value=0 TIPOL X X+1 X+2 X+3 X+4 X+5 X+6 X+7 TOTALE OVER
|table TIPOL X X+1 X+2 X+3 X+4 X+5 X+6 X+7  TOTALE OVER]

. (others APPEND)

.

.

|table TIPOL X X+1 X+2 X+3 X+4 X+5 X+6 X+7  TOTALE OVER&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RESULT:&lt;/P&gt;
&lt;P&gt;TIPOL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X&amp;nbsp; &amp;nbsp; X+1&amp;nbsp; &amp;nbsp;X+2&amp;nbsp; &amp;nbsp; X+3 ........ TOTAL&amp;nbsp; &amp;nbsp;OVER&lt;/P&gt;
&lt;P&gt;AMPLIAMENTI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;.......&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DESIRED:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TIPOL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X&amp;nbsp; &amp;nbsp; X+1&amp;nbsp; &amp;nbsp;X+2&amp;nbsp; &amp;nbsp; X+3 ........ TOTAL&amp;nbsp; &amp;nbsp;OVER&lt;/P&gt;
&lt;P&gt;AMPLIAMENTI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;.......&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;SUBNET - VOCE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; .........&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;TKS&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 14:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599841#M208792</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2022-05-31T14:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: display null event result (fillnull)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599845#M208795</link>
      <description>&lt;P&gt;Did you try fillnull before stats sum command?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599845#M208795</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-05-31T08:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: display null event result (fillnull)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599846#M208796</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I tried your suggestion, putting fillnull before stats, but nothing, no result, the line doesn't show.&lt;BR /&gt;Tks&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599846#M208796</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2022-05-31T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: display null event result (fillnull)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599848#M208797</link>
      <description>&lt;P&gt;Assuming your field names don't really have + signs in, try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats sum(X) as X, sum(X+1) as X+1,sum(X+2) as X+2, sum(X+3) as X+3,sum(X+4) as X+4,sum(X+5) as X+5, sum(X+6) as X+6,sum(X+7) as X+7, sum(TOTALE) as TOTALE,sum(TUTTI) as OVER
| appendpipe [stats count as _count
              | where _count = 0
              | eval X = 0, X+1 = 0, X+2 = 0, X+3 = 0, X+4 = 0, X+5 = 0, X+6 = 0, X+7 = 0, TOTALE = 0, OVER = 0]
|eval TIPOL ="AMPLIAMENTI"&lt;/LI-CODE&gt;&lt;P&gt;Similarly for other values of TIPOL&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599848#M208797</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-31T08:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: display null event result (fillnull)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599859#M208805</link>
      <description>&lt;P&gt;Hi IT Whisperer,&lt;BR /&gt;you are the best !!!&lt;BR /&gt;Great was just what I needed and I couldn't do.&lt;BR /&gt;Thank you so much for your great help.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 09:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-null-event-result-fillnull/m-p/599859#M208805</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2022-05-31T09:33:08Z</dc:date>
    </item>
  </channel>
</rss>

