<?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 remove columns from search results when they are empty? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231844#M68781</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your search till appendpipe...| appendpipe  [stats  count | eval  "Active Alerts"="None" | where  count=0 | table "Active Alerts"] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Aug 2016 20:59:16 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-08-17T20:59:16Z</dc:date>
    <item>
      <title>How to remove columns from search results when they are empty?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231843#M68780</link>
      <description>&lt;P&gt;I am trying to remove columns from my search when they return null. Previously, my entire panel would just result with "no results found", but I wanted to display something here instead of that message, so I appended a column, but when I tried to use &lt;CODE&gt;fields - (column names)&lt;/CODE&gt;, nothing really happened.&lt;/P&gt;

&lt;P&gt;Here is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="nitro_prod_summary" earliest=-1h@m latest=@m [| `nitro_prod_cmdb` | search Category="merch" Service="*" Application="*" | search Application!="LOD" | stats count by Application | table Application] | join Application [ | `nitro_prod_cmdb` ] | search Alert_Type="*" Metric_Category="*" | eval FilterKey=Description.ID | dedup FilterKey |search Category!="FINANCE" | table Alert_Type Category Service Application Metric_Category Description Key ID | rename Metric_Category as "Type" Alert_Type as "Alert" count as Count | sort +Alert | appendpipe  [stats  count | eval  "Active Alerts"="None" | where  count==0 | fields  - count] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried:&lt;BR /&gt;
&lt;CODE&gt;fields - count, Alert_Type, Category, Service,  Application, Metric_Category, Description, Key, ID&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;fields - count Alert_Type Category Service  Application Metric_Category Description Key ID&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;fields -&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 20:45:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231843#M68780</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-17T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove columns from search results when they are empty?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231844#M68781</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your search till appendpipe...| appendpipe  [stats  count | eval  "Active Alerts"="None" | where  count=0 | table "Active Alerts"] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Aug 2016 20:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231844#M68781</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-17T20:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove columns from search results when they are empty?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231845#M68782</link>
      <description>&lt;P&gt;Unfortunately this did not work.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 19:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-columns-from-search-results-when-they-are-empty/m-p/231845#M68782</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-18T19:36:29Z</dc:date>
    </item>
  </channel>
</rss>

