<?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 roundoff the results to 2 decimal degits in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589674#M48344</link>
    <description>&lt;LI-CODE lang="markup"&gt;index= **** 
| stats avg(upstream_response_time), p95(upstream_response_time), p99(upstream_response_time) by service
| foreach *upstream_response_time*
  [| eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',2)]&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 18 Mar 2022 11:06:28 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-03-18T11:06:28Z</dc:date>
    <item>
      <title>How to roundoff the results to 2 decimal digits?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589671#M48342</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;I have a search query as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index= **** | stats avg(upstream_response_time), p95(upstream_response_time), p99(upstream_response_time) by service&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives me results as below...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1647600836749.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18583i44A3C2F5C25A43C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1647600836749.png" alt="SG_0-1647600836749.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;i wanted to roundoff the decimal values to 2 digits for all column values. I tried something like this but it didnt give me any results, Can you please help me how can i trim the results to 2 digits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index= **** | eval upstream_response_times = round(upstream_response_time,2) | stats avg(upstream_response_times), p95(upstream_response_times), p99(upstream_response_times) by service&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 22:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589671#M48342</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-23T22:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal degits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589674#M48344</link>
      <description>&lt;LI-CODE lang="markup"&gt;index= **** 
| stats avg(upstream_response_time), p95(upstream_response_time), p99(upstream_response_time) by service
| foreach *upstream_response_time*
  [| eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',2)]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589674#M48344</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-18T11:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal degits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589677#M48346</link>
      <description>&lt;P&gt;Tried the below ways, but the result is not trimmed to 2 digits&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= ****
| stats avg(upstream_response_time), p95(upstream_response_time), p99(upstream_response_time) by service
| foreach "upstream_response_time"
  [| eval "upstream_response_time"=round('upstream_response_time',2)]


index= ****
| stats avg(upstream_response_time), p95(upstream_response_time), p99(upstream_response_time) by service
| foreach *upstream_response_time*
  [| eval "upstream_response_time"=round('upstream_response_time',2)]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589677#M48346</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-18T11:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal degits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589678#M48347</link>
      <description>&lt;P&gt;'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'&amp;nbsp; was not used here by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; as a string to replace by you. It should have been pasted as is. It's a placeholder to be replaced during the search by the field name matched by foreach.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Foreach" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Foreach&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You might consider using fieldformat instead of eval but that can lead to some hard to spot inconsistencies if you plan to further process the fields down the pipeline.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589678#M48347</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-18T11:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589913#M48392</link>
      <description>&lt;P&gt;Even as is if i mention the field name also it is not rounding off the results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1647833902408.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18643i7DB170B9F3B77D18/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1647833902408.png" alt="SG_0-1647833902408.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 03:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589913#M48392</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-21T03:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589915#M48393</link>
      <description>&lt;P&gt;In the eval statement, put the word&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;as directed by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;and NOT what you have put.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 04:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589915#M48393</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-03-21T04:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589917#M48394</link>
      <description>&lt;P&gt;Even that is not helping me to roundoff the column values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1647837549630.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18644i8A7704E24211B72E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1647837549630.png" alt="SG_0-1647837549630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to mention one more thing here, i.e, the values i am planning to search here are written to summary index from the original index.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 04:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589917#M48394</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-21T04:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589930#M48397</link>
      <description>&lt;P&gt;This time you omitted the asterisks around the partial field name.&lt;/P&gt;&lt;P&gt;Please see &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Foreach" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Foreach&lt;/A&gt; for the description how foreach works.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 18:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589930#M48397</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-21T18:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589936#M48399</link>
      <description>&lt;P&gt;Try doing the foreach exactly as I suggested&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 07:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589936#M48399</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-21T07:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal degits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589947#M48401</link>
      <description>&lt;P&gt;Thank a lot, Its working.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 08:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/589947#M48401</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-21T08:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to roundoff the results to 2 decimal digits</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/590331#M48451</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I applied the same and it is working fine. Thanks!!!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 06:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-roundoff-the-results-to-2-decimal-digits/m-p/590331#M48451</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2022-03-23T06:06:13Z</dc:date>
    </item>
  </channel>
</rss>

