<?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 filter out columns in a chart after using a lookup and addtotals in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252852#M75670</link>
    <description>&lt;P&gt;@sundareshr Thanks for showing me how to use untable and xyseries. I definitely think I will use those in the future. However, the where logic doesn't work as expected. I started down the rabbit hole of researching logic tables...but this problem is a trivial one for me and I think I will just do an eval to create a mvfield of row labels where the row sum = 0. That's all I really need. &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 15:34:05 GMT</pubDate>
    <dc:creator>_jgpm_</dc:creator>
    <dc:date>2016-12-02T15:34:05Z</dc:date>
    <item>
      <title>how to filter out columns in a chart after using a lookup and addtotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252850#M75668</link>
      <description>&lt;P&gt;I lost all my previous text because I accidentally navigated away from the page so I'll be brief here. I'm using 6.4.3.&lt;/P&gt;

&lt;P&gt;I used this pseudocode search command:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;basicsearch | stats values(ID) by name | lookup file to extend chart | addtotals col=t fieldname=sum | foreach field [eval field_perc=calc a percentage] &lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is where I'm stuck. I can't think of how to remove a column where the addtotals row = 0. My chart has 30 fields so I don't want to list them all. I've tried using&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt; foreach field [ fields - if(does field==0, then field,otherwise null) ] &lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but it only erases the field itself, not the column. &lt;/P&gt;

&lt;P&gt;I want to keep all the rows, but only reduce the columns down to the meaningful ones (i.e. nonzero columns).&lt;/P&gt;

&lt;P&gt;I appreciate any suggestions. Thank you. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:32:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252850#M75668</guid>
      <dc:creator>_jgpm_</dc:creator>
      <dc:date>2016-12-01T20:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter out columns in a chart after using a lookup and addtotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252851#M75669</link>
      <description>&lt;P&gt;Add this to your query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | untable name fields data | where fields="row" AND data=0 | xyseries name fields data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252851#M75669</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-12-01T20:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter out columns in a chart after using a lookup and addtotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252852#M75670</link>
      <description>&lt;P&gt;@sundareshr Thanks for showing me how to use untable and xyseries. I definitely think I will use those in the future. However, the where logic doesn't work as expected. I started down the rabbit hole of researching logic tables...but this problem is a trivial one for me and I think I will just do an eval to create a mvfield of row labels where the row sum = 0. That's all I really need. &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 15:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-filter-out-columns-in-a-chart-after-using-a-lookup-and/m-p/252852#M75670</guid>
      <dc:creator>_jgpm_</dc:creator>
      <dc:date>2016-12-02T15:34:05Z</dc:date>
    </item>
  </channel>
</rss>

