Splunk Search

How to use timechart with Eval command

shugup2923
Path Finder

index=storage source="/******.csv"
| stats sum(00_
) //It represents sum of various fields
| eval sum1=0
| foreach sum*
[ eval sum1=sum1+'<>']
| addinfo
| eval time_in_min=(info_max_time-info_min_time)/60
| eval sum1=sum1/time_in_min //It shows the average value
| fields sum1

I need timechart for sum1 with above data, is it possible ? Any help would be appreciated.
Thanks in Advance

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The problem lies with the stats and fields commands. They stripped out the _time field required by timechart. Use streamstats in place of stats or find a way to include _time in stats. Change fields sum1 to fields _time sum1.

---
If this reply helps you, Karma would be appreciated.

kamlesh_vaghela
SplunkTrust
SplunkTrust

@shugup2923

Can you please share your search using code block?

0 Karma
Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

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

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk &#43; Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...