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
Legend

@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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...