<?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 Splunk display a value when no logs are found in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641837#M222336</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a field which has 3 values i.e., 0 , 1 &amp;amp; 2.&lt;/P&gt;&lt;P&gt;0 for Green , 1 for Blue and 2 for Red. I'm using this values to show colour differences in dashboard.&lt;/P&gt;&lt;P&gt;But the search fetches data only at a particular time in a day , so the remaining time there is no data.&lt;/P&gt;&lt;P&gt;When there is no data , the dashboard is not loading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to indicate no data with black colour in the dashboard.&lt;/P&gt;&lt;P&gt;How can I do that? where in if there is no day I can create and map a field value in dashboard&lt;/P&gt;</description>
    <pubDate>Sun, 30 Apr 2023 12:35:50 GMT</pubDate>
    <dc:creator>Dayalss</dc:creator>
    <dc:date>2023-04-30T12:35:50Z</dc:date>
    <item>
      <title>Splunk display a value when no logs are found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641837#M222336</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a field which has 3 values i.e., 0 , 1 &amp;amp; 2.&lt;/P&gt;&lt;P&gt;0 for Green , 1 for Blue and 2 for Red. I'm using this values to show colour differences in dashboard.&lt;/P&gt;&lt;P&gt;But the search fetches data only at a particular time in a day , so the remaining time there is no data.&lt;/P&gt;&lt;P&gt;When there is no data , the dashboard is not loading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to indicate no data with black colour in the dashboard.&lt;/P&gt;&lt;P&gt;How can I do that? where in if there is no day I can create and map a field value in dashboard&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 12:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641837#M222336</guid>
      <dc:creator>Dayalss</dc:creator>
      <dc:date>2023-04-30T12:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk display a value when no logs are found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641840#M222339</link>
      <description>&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;appendpipe&lt;/FONT&gt; command to add values when none are returned by your query.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;&amp;lt;your search&amp;gt;&amp;gt;
| appendpipe [ stats count | eval colour="black" | where count = 0 | fields - count]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 14:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641840#M222339</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-30T14:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk display a value when no logs are found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641841#M222340</link>
      <description>&lt;P&gt;Its not working , because I'm tracking the field Status for colour change using below query&lt;/P&gt;&lt;P&gt;index = xyz sourcetype =abc&lt;BR /&gt;|eval Status =if(Statistic=0,"Green" , if(Statistic=2 ,"Red",if(Statistic=1,"Blue", " " )))&lt;BR /&gt;|stats latest(Status)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please suggest according to above query?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 15:02:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641841#M222340</guid>
      <dc:creator>Dayalss</dc:creator>
      <dc:date>2023-04-30T15:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk display a value when no logs are found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641842#M222341</link>
      <description>&lt;P&gt;I suspect you were too literal in applying my answer.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = xyz sourcetype =abc
| eval Status=case(Statistic=0,"Green" , 
                   Statistic=2,"Red",
                   Statistic=1,"Blue", 
                   1==1, " " )
| appendpipe [ stats count | eval Status="Black" | where count=0 | fields - count]
| stats latest(Status)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 30 Apr 2023 16:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-display-a-value-when-no-logs-are-found/m-p/641842#M222341</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-30T16:42:13Z</dc:date>
    </item>
  </channel>
</rss>

