Refine your search:

Hi ,

I have been using the stats avg(duration) as Avg_Duration in my query.But while displayin the Avg_Duration i am getting the output value with 6 decimal digits after the precision.Something like 2.123456 i would like to round it off to four digits only.Tried using the round function along with the stats command..but it didnt worked.

Please help me on this .Thanx

asked 30 May '12, 01:11

rakesh_498115's gravatar image

rakesh_498115
6571310
accept rate: 0%


One Answer:

What have you tried already when you tried to round? Something like this works with my setup;

| stats avg(duration) as Avg_duration | eval Avg_duration=round(Avg_duration,0)
link

answered 30 May '12, 03:07

Drainy's gravatar image

Drainy
8.2k617
accept rate: 24%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×10

Asked: 30 May '12, 01:11

Seen: 662 times

Last updated: 30 May '12, 03:07

Copyright © 2005-2012 Splunk Inc. All rights reserved.