Getting Data In

How can I add an previous date count information column?

hoya
New Member

I'd like to see the previous date count together with the current date count on one line. Is there a way?

The present condition is as follows:

=> spl : | stats count("bug_id") as count by date

date count

2019-01-31 100

2019-01-29 75

2019-01-21 50

The examples I want are as follows.
( add column : pre_date_count)


date count pre_date_count

2019-01-31 100 75
2019-01-29 75 50
2019-01-21 50

Thank you for your interest.

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@hoya,
Try

=> spl : | stats count("bug_id") as count by date
|reverse|streamstats current=f window=1 last(count) as pre_date_count |reverse
Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...