<?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 use IF and ROUND together in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740813#M240487</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval resp_bytes=if(resp_bytes=0, "0B",if(resp_bytes&amp;lt;1000000,round(resp_bytes/1024,2) . "KB",if(resp_bytes&amp;gt;1000000,round(resp_bytes/1024/1024,2) . "MB", null))) &lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 04 Mar 2025 18:02:30 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2025-03-04T18:02:30Z</dc:date>
    <item>
      <title>How to use IF and ROUND together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740811#M240486</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to write a search query for responding byte sizes that is a catch all. Currently I have:&lt;/P&gt;&lt;P&gt;index=index&amp;nbsp; 8.8.8.8&lt;BR /&gt;&lt;SPAN&gt;| stats sum(resp_bytes) as resp_bytes&lt;BR /&gt;| eval resp_bytes=if(resp_bytes=0, "0B",if(resp_bytes&amp;lt;1000000,resp_bytes/1024 . "KB",if(resp_bytes&amp;gt;1000000,resp_bytes/1024/1024 . "MB", null)))&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tested this and it works, but now i am trying to add in a "round" to the 2nd decimal spot. and Im not sure where it would go.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 17:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740811#M240486</guid>
      <dc:creator>ajmach343</dc:creator>
      <dc:date>2025-03-04T17:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IF and ROUND together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740813#M240487</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval resp_bytes=if(resp_bytes=0, "0B",if(resp_bytes&amp;lt;1000000,round(resp_bytes/1024,2) . "KB",if(resp_bytes&amp;gt;1000000,round(resp_bytes/1024/1024,2) . "MB", null))) &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Mar 2025 18:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740813#M240487</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-04T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IF and ROUND together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740814#M240488</link>
      <description>&lt;P&gt;that worked thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 18:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-IF-and-ROUND-together/m-p/740814#M240488</guid>
      <dc:creator>ajmach343</dc:creator>
      <dc:date>2025-03-04T18:07:24Z</dc:date>
    </item>
  </channel>
</rss>

