<?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: Ignore Empty valued bars in Bar Chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314390#M94115</link>
    <description>&lt;P&gt;It didn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; @niketnilay &lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2017 03:18:47 GMT</pubDate>
    <dc:creator>harish_ka</dc:creator>
    <dc:date>2017-05-31T03:18:47Z</dc:date>
    <item>
      <title>Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314385#M94110</link>
      <description>&lt;P&gt;I have a report which shows top 3 errors by month,error. i am trying to plot this on a bar chart (Not timechart), so the bar chart displays the empty errors fields as blank, which looks very odd.&lt;/P&gt;

&lt;P&gt;My result looks like this,&lt;/P&gt;

&lt;P&gt;Month ----  Er1 ---------Er2-------Er3--------Er4---------Er5---------Er6&lt;/P&gt;

&lt;P&gt;Jan ---------  20   --------  XX ------10 -------- 15 ---------XX------------XX&lt;BR /&gt;
Feb---------  XX  ---------- 14------- 12 --------XX----------15-----------XX &lt;BR /&gt;
Mar--------- 10  ---------- 14------- XX --------XX----------XX-----------20&lt;/P&gt;

&lt;P&gt;So in my bar chart for each month it shows 6 bars (as the total type of errors are 6), but i want to show only the 3 bars with values.&lt;BR /&gt;
Any option of keeping the bars values in descending order will also work... so that i can keep the bar with ) count to the end...&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314385#M94110</guid>
      <dc:creator>harish_ka</dc:creator>
      <dc:date>2017-05-30T10:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314386#M94111</link>
      <description>&lt;P&gt;Can you add SPL for this as well? What is your final pipe for building the chart.&lt;BR /&gt;
Is your zero values actually XX in the data or 0 or have you just mocked it?&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 12:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314386#M94111</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-30T12:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314387#M94112</link>
      <description>&lt;P&gt;Please find the SPL beow,&lt;/P&gt;

&lt;P&gt;search ... | stats count as ErrorCount by Error,Date|sort Date,-count|dedup 5 Date|chart values(ErrorCount ) as count by Date,Error.&lt;/P&gt;

&lt;P&gt;Here the XX value is null, not zero, i just mocked here..&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 15:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314387#M94112</guid>
      <dc:creator>harish_ka</dc:creator>
      <dc:date>2017-05-30T15:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314388#M94113</link>
      <description>&lt;P&gt;Change your chart command to the following and see if it helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| chart max(ErrorCount ) as count by Date,Error cont=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With your existing query with values(ErrorCount), I am assuming there is either only single value per aggregation by Date, Error or no value. So you can add &lt;CODE&gt;cont=false&lt;/CODE&gt; to drop bins with null or no values. I have changed from values() to max() to avoid multiple value, however depending on your data that might not be required.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 15:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314388#M94113</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-30T15:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314389#M94114</link>
      <description>&lt;P&gt;For those trying to play along at home, use this search for "Last 60 minutes":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_*
| rename sourcetype AS Error date_hour AS Date
| stats count AS ErrorCount BY Error Date
| sort Date -ErrorCount
| dedup 3 Date
| chart values(ErrorCount) AS count BY Date Error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then I select &lt;CODE&gt;Bar Chart&lt;/CODE&gt; and notice that the ones with no values show blank spots.  I believe the ask is to collapse those blank spots, which I do not think is possible with Simple XML.  You will have to do a custom visualization or file an Enhancement Request.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 16:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314389#M94114</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-30T16:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore Empty valued bars in Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314390#M94115</link>
      <description>&lt;P&gt;It didn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; @niketnilay &lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 03:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-Empty-valued-bars-in-Bar-Chart/m-p/314390#M94115</guid>
      <dc:creator>harish_ka</dc:creator>
      <dc:date>2017-05-31T03:18:47Z</dc:date>
    </item>
  </channel>
</rss>

