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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...