Splunk Search

limit timechart with span and per_hour to 2 decimal values

rajnsoni92
Explorer

I have below query which shows values in line chart with up to 5 decimals and I want to limit it to max 2 decimals.

 

search text .. | eval reqs = 1 | timechart span=24h per_hour(reqs) as AvgReqPerHour

 

 

Labels (1)
Tags (2)
0 Karma

rajnsoni92
Explorer

Thank @etoombs It worked.

0 Karma

etoombs
Path Finder

Add this after your time chart:

| fieldformat AvgReqPerHour= round(AvgReqPerHour,2)

If you don't want the rounding, look at floor or max for the behaviors you want.

Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...