Splunk Search

both stats and timechart gives different values

splunkuseradmin
Path Finder

Hi all
I was wondering if i can get some help in this. as I have some fields in stats and i want span=1w of that.
when I use ....|timechart sapn=1w give me different values than in stats.
I juss want those stats values to be shown by week.

thanks

Tags (1)
0 Karma

arjunpkishore5
Motivator

For binning stats, do this

|bucket span=1w _time
|stats your_aggregations by _time, your_grouping_fields

0 Karma

kmaron
Motivator

you can add a 1 week span to your stats like this

| bucket _time span=1w

and then add _time to the by callMediaType for your stats command.

also, your stats has a by callMediaType but you did not include that in your timechart. This in and of itself would make the results different. Is that on purpose?

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...