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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...