<?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 round a number to hundreds or thousands? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295666#M145273</link>
    <description>&lt;P&gt;try this &lt;/P&gt;

&lt;P&gt;| makeresults | eval number=22113 | eval number=sigfig(1.00*number)&lt;/P&gt;

&lt;P&gt;Result is &lt;/P&gt;

&lt;P&gt;_time                       number&lt;BR /&gt;&lt;BR /&gt;
2017-07-05 11:19:58     22100 &lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2017 15:20:49 GMT</pubDate>
    <dc:creator>sbbadri</dc:creator>
    <dc:date>2017-07-05T15:20:49Z</dc:date>
    <item>
      <title>How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295661#M145268</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;I want to create tables that are easier to read and round the numbers to hundreds or thousands. Like&lt;/P&gt;
&lt;P&gt;22113 -&amp;gt; 22100 or&lt;BR /&gt;22113 -&amp;gt; 22000&lt;/P&gt;
&lt;P&gt;How can I achieve this?&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;BR /&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 17:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295661#M145268</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-08-28T17:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295662#M145269</link>
      <description>&lt;P&gt;You can use eval and do it this way -&lt;BR /&gt;
To 100s -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval number=22113 | eval number=number-(number%100)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To 1000s - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval number=22113 | eval number=number-(number%1000)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 08:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295662#M145269</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-07-05T08:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295663#M145270</link>
      <description>&lt;P&gt;Is there a restriction to prefixing or suffixing the number with padded 0s?&lt;BR /&gt;
Following examples will pad leading zeros and retain original number&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Using printf (Splunk 6.6 onwards)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval number= 581
| fieldformat number=printf("%04d",number)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 09:12:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295663#M145270</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-05T09:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295664#M145271</link>
      <description>&lt;P&gt;Thanks, we are still on 6.5, so I'm currently not able to try it out&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 14:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295664#M145271</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2017-07-05T14:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295665#M145272</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;

&lt;P&gt;| makeresults | eval number=22913 | eval number=number-(number%1000)&lt;/P&gt;

&lt;P&gt;The above will end up with 22000 instead of 23000, so its more cutting that rounding. Is there a way to fix this?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 14:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295665#M145272</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2017-07-05T14:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295666#M145273</link>
      <description>&lt;P&gt;try this &lt;/P&gt;

&lt;P&gt;| makeresults | eval number=22113 | eval number=sigfig(1.00*number)&lt;/P&gt;

&lt;P&gt;Result is &lt;/P&gt;

&lt;P&gt;_time                       number&lt;BR /&gt;&lt;BR /&gt;
2017-07-05 11:19:58     22100 &lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 15:20:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/295666#M145273</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-07-05T15:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to round a number to hundreds or thousands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/516661#M145274</link>
      <description>&lt;P&gt;Great!!! &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 09:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-round-a-number-to-hundreds-or-thousands/m-p/516661#M145274</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2020-08-28T09:53:37Z</dc:date>
    </item>
  </channel>
</rss>

