<?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: using round/floor function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47073#M179406</link>
    <description>&lt;P&gt;More details please? How is it not working? What search string are you using?&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2012 11:46:35 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-11-28T11:46:35Z</dc:date>
    <item>
      <title>using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47072#M179405</link>
      <description>&lt;P&gt;hi all,&lt;BR /&gt;
i just want to round some values in secs. i tried with round and floor options. but it  is not working. i extracted this field by sing MV_ADD option..&lt;BR /&gt;
please help&lt;BR /&gt;
thank u&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 11:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47072#M179405</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-28T11:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47073#M179406</link>
      <description>&lt;P&gt;More details please? How is it not working? What search string are you using?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 11:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47073#M179406</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-28T11:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47074#M179407</link>
      <description>&lt;P&gt;index=main source=bbb.txt field1=*| eval btime=round(b1time,2)|table field1 btime b1time&lt;BR /&gt;
now btime firld is empty&lt;BR /&gt;
i extracted it using MV_ADD option because all these field value come under one event i.e &lt;BR /&gt;
[get_b1time]&lt;BR /&gt;
REGEX=""&lt;BR /&gt;
MV_ADD=true&lt;BR /&gt;
it worked fine and b1time valuees are correct.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47074#M179407</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2020-09-28T12:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47075#M179408</link>
      <description>&lt;P&gt;The following search will illustrate the different results you can expect from the &lt;CODE&gt;floor, round&lt;/CODE&gt; and &lt;CODE&gt;ceil&lt;/CODE&gt; functions. I've used the time as input, since you can easily reproduce the results. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | head 1 | eval XX = _time / 1000000 | eval floorX = floor(XX) | eval r0X = round(XX,0) | eval r1X = round(XX,1) | eval r3X = round(XX,3) | eval ceilX = ceil(XX) | table XX, floorX, r0X, r1X, r3X, ceilX&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 12:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47075#M179408</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-11-28T12:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47076#M179409</link>
      <description>&lt;P&gt;i am sorry for this late update,, but if there is only one value per event , then it is working,, wats wrong when extracting multiple values from same event&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 12:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47076#M179409</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-28T12:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47077#M179410</link>
      <description>&lt;P&gt;Perhaps using &lt;CODE&gt;mvexpand&lt;/CODE&gt; could solve your issue?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 12:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47077#M179410</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-28T12:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47078#M179411</link>
      <description>&lt;P&gt;appreciating your effort,, but mvexpand is working only for one multivalue field extraction in one event,, but i have three ..&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 13:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47078#M179411</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-28T13:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47079#M179412</link>
      <description>&lt;P&gt;Dirty floor() workaround for multivalued fields &lt;/P&gt;

&lt;P&gt;Given these non-integer values &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 increment=1h | stats list(eval(starttime/1000)) as times 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;run this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval times=mvjoin(times,";") | rex mode=sed field=times "s/\.[0-9]+//g" | eval times=split(times,";")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is assuming that the times you have are in epoch format, but should work for other data formats too.&lt;/P&gt;

&lt;P&gt;The other alternative is to mvzip up all your multivalued fields into a new field, mvexpand the new field, extract out the time field, perform your floor function on it, then join everything up again.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 14:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47079#M179412</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2012-11-28T14:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47080#M179413</link>
      <description>&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/66840/how-to-sum-output-of-table-command"&gt;http://splunk-base.splunk.com/answers/66840/how-to-sum-output-of-table-command&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2012 08:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47080#M179413</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-29T08:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47081#M179414</link>
      <description>&lt;P&gt;Dirtyfloor? can u explain a little bit&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47081#M179414</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-29T11:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: using round/floor function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47082#M179415</link>
      <description>&lt;P&gt;It emulates floor without having to split the values into seperate events&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2012 18:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-round-floor-function/m-p/47082#M179415</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2012-12-20T18:27:56Z</dc:date>
    </item>
  </channel>
</rss>

