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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...