<?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: Line chart does not display the value zero even after setting the code to use one decimal place in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378130#M110859</link>
    <description>&lt;P&gt;Hello jluo,&lt;/P&gt;

&lt;P&gt;Thanks for the quick response.  I tried your suggestion but unfortunately, I still got a whole number on the line chart.  &lt;/P&gt;

&lt;P&gt;Could this be a version issue (I'm using 7.0.1 on my local machine and implementing the dashboard codes on an instance using 6.4.1) ?&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 02:56:46 GMT</pubDate>
    <dc:creator>marklindo</dc:creator>
    <dc:date>2018-06-12T02:56:46Z</dc:date>
    <item>
      <title>Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378126#M110855</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Seeking for any assistance on the issue I am encountering.&lt;/P&gt;

&lt;P&gt;Issue:  Line chart does not display the value zero even after setting the code to use one decimal place.  E.g.  a value with 6.7 will display the ".7" after the number but a value with 6.0 only displays 6 in the line chart without the ".0"&lt;/P&gt;

&lt;P&gt;Here's a screenshot of the line chart:&lt;BR /&gt;
![alt text][1]&lt;/P&gt;

&lt;P&gt;Here's the code I have created to generate the line chart:&lt;BR /&gt;
  | stats sum(Cost1) as SumCost1, sum(Hours) as SumHours by Quarter &lt;BR /&gt;
  | eval HourlyCost = round(('Cost1') / ('Hours'),1) &lt;/P&gt;

&lt;P&gt;I'm not sure how this can be addressed so any help would be very much appreciated.&lt;/P&gt;

&lt;P&gt;Thank you for assisting.&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 11:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378126#M110855</guid>
      <dc:creator>marklindo</dc:creator>
      <dc:date>2018-06-08T11:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378127#M110856</link>
      <description>&lt;P&gt;Hi Marklindo,&lt;/P&gt;

&lt;P&gt;It looks like your search is plotting SumCost1 and SumHours by quarter, but those two fields are not being manipulated to show the first decimal place - you are only manipulating HourlyCost. If you'd like the two lines on the chart (SumCost1 and SumHours) to include the first decimal place, try this..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats sum(Cost1) as SumCost1, sum(Hours) as SumHours by Quarter 
| eval SumCost1 = round(SumCost1, 1)
| eval SumHours = round(SumHours, 1)
| eval HourlyCost = round(('Cost1') / ('Hours'),1)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jun 2018 15:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378127#M110856</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-08T15:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378128#M110857</link>
      <description>&lt;P&gt;Hello Jluo,&lt;/P&gt;

&lt;P&gt;Thanks for the response.  I apologize but I made a mistake on the code I posted.  Here's the correct version of the code: &lt;/P&gt;

&lt;P&gt;| stats sum(SumCost1) as SumCost1, sum(SumHours ) as SumHours by Quarter &lt;BR /&gt;
| eval HourlyCost = round ( ( 'SumCost1' / 'SumHours ' ) ,1 )&lt;/P&gt;

&lt;P&gt;You were correct in your assessment that I am plotting SumCost1 and SumHours by Quarter.  I did try your suggestion but there were no changes on the output.&lt;/P&gt;

&lt;P&gt;Is it safe to conclude that Splunk does not plot the ".0" if the output is a whole number.  I did test this theory by rounding  to 2 decimal places and got a value of "1.09" (apologies I am having difficulty attaching the screenshot on the reply button) .&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 03:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378128#M110857</guid>
      <dc:creator>marklindo</dc:creator>
      <dc:date>2018-06-11T03:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378129#M110858</link>
      <description>&lt;P&gt;Ben,&lt;/P&gt;

&lt;P&gt;I tested on my own env and can confirm that I can see the ".0" even if the output is a whole number. I think one issue may be with all the spaces in your code.. try this..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats sum(SumCost1) as SumCost1, sum(SumHours) as SumHours by Quarter 
| eval HourlyCost = round((SumCost1/SumHours),1)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378129#M110858</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-11T15:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378130#M110859</link>
      <description>&lt;P&gt;Hello jluo,&lt;/P&gt;

&lt;P&gt;Thanks for the quick response.  I tried your suggestion but unfortunately, I still got a whole number on the line chart.  &lt;/P&gt;

&lt;P&gt;Could this be a version issue (I'm using 7.0.1 on my local machine and implementing the dashboard codes on an instance using 6.4.1) ?&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 02:56:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378130#M110859</guid>
      <dc:creator>marklindo</dc:creator>
      <dc:date>2018-06-12T02:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378131#M110860</link>
      <description>&lt;P&gt;Could you share a screenshot of the resulting chart and search string?&lt;/P&gt;

&lt;P&gt;This wouldn't be a version issue - the round function has been stable historically.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378131#M110860</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-12T16:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378132#M110861</link>
      <description>&lt;P&gt;Hello jluo,&lt;/P&gt;

&lt;P&gt;Thanks for the response.  I attached a link as requested.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://imgur.com/a/43JXdho"&gt;https://imgur.com/a/43JXdho&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;regards,&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 07:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378132#M110861</guid>
      <dc:creator>marklindo</dc:creator>
      <dc:date>2018-06-13T07:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378133#M110862</link>
      <description>&lt;P&gt;Hi Ben,&lt;/P&gt;

&lt;P&gt;This is still using your original search string that is plotting out sumCost and sumHours, which are not being rounded. Can you post the result of this string from above?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats sum(Cost1) as SumCost1, sum(Hours) as SumHours by Quarter 
 | eval SumCost1 = round(SumCost1, 1)
 | eval SumHours = round(SumHours, 1)
 | eval HourlyCost = round(('Cost1') / ('Hours'),1)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 03:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378133#M110862</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-14T03:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart does not display the value zero even after setting the code to use one decimal place</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378134#M110863</link>
      <description>&lt;P&gt;Hello jluo,&lt;/P&gt;

&lt;P&gt;I tried your suggestion but i still got the same results.&lt;/P&gt;

&lt;P&gt;Please see link: &lt;A href="https://imgur.com/a/hnvmk5H"&gt;https://imgur.com/a/hnvmk5H&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;regards,&lt;BR /&gt;
Ben&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 04:03:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-chart-does-not-display-the-value-zero-even-after-setting/m-p/378134#M110863</guid>
      <dc:creator>marklindo</dc:creator>
      <dc:date>2018-06-14T04:03:27Z</dc:date>
    </item>
  </channel>
</rss>

