<?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 Insert &amp;quot;%&amp;quot; symbol to a number without converting it to string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Insert-quot-quot-symbol-to-a-number-without-converting-it-to/m-p/324836#M96878</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is it possible to add a "%" character/symbol to a number without converting it to a string?&lt;/P&gt;

&lt;P&gt;I tried to use this code:&lt;BR /&gt;
    &lt;CODE&gt;| eval percentage = round((On_time/Total)*100)."%"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But it converted the number into a string, so when I try to use the "percentage" field as an overlay in a Column Chart, it does not show anything. It has to be an integer. &lt;BR /&gt;
I want it to have the "%" character so that when I hover over the overlay, the value would have the "%" sign so that it would be easy to know that it is a percentage, not just any number.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;I hope anyone can help me with this.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2017 07:55:25 GMT</pubDate>
    <dc:creator>jvmerilla</dc:creator>
    <dc:date>2017-12-08T07:55:25Z</dc:date>
    <item>
      <title>Insert "%" symbol to a number without converting it to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Insert-quot-quot-symbol-to-a-number-without-converting-it-to/m-p/324836#M96878</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is it possible to add a "%" character/symbol to a number without converting it to a string?&lt;/P&gt;

&lt;P&gt;I tried to use this code:&lt;BR /&gt;
    &lt;CODE&gt;| eval percentage = round((On_time/Total)*100)."%"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But it converted the number into a string, so when I try to use the "percentage" field as an overlay in a Column Chart, it does not show anything. It has to be an integer. &lt;BR /&gt;
I want it to have the "%" character so that when I hover over the overlay, the value would have the "%" sign so that it would be easy to know that it is a percentage, not just any number.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;I hope anyone can help me with this.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 07:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Insert-quot-quot-symbol-to-a-number-without-converting-it-to/m-p/324836#M96878</guid>
      <dc:creator>jvmerilla</dc:creator>
      <dc:date>2017-12-08T07:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Insert "%" symbol to a number without converting it to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Insert-quot-quot-symbol-to-a-number-without-converting-it-to/m-p/324837#M96879</link>
      <description>&lt;P&gt;By definition, a field with anything other than digits or '.' is a string.  There is no way around that.&lt;BR /&gt;
If you were using a pie chart, you could use the SimpleXML charting.chart.showPercent option to display percentages, but that is not supported by other chart types.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 13:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Insert-quot-quot-symbol-to-a-number-without-converting-it-to/m-p/324837#M96879</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-12-08T13:59:21Z</dc:date>
    </item>
  </channel>
</rss>

