Splunk Search

Stacked timechart of accumulative count with missing values?

noambz
Explorer

Hi,

I have the following search which generates the data below:

some_search | bucket _time span=1h | stats count as total_count by _time gender | streamstats sum(total_count) as acc_count by gender.

time/gender/count/acc_count

2/21/13 9:00:00.000 PM female 1 1

2/21/13 9:00:00.000 PM male 1 1

2/22/13 9:00:00.000 PM female 1 2

2/22/13 9:00:00.000 PM male 1 2

2/22/13 7:00:00.000 PM female 1 3

2/23/13 9:00:00.000 PM male 2 4

2/24/13 9:00:00.000 PM male 1 5

When I chart it with:

| timechart span=1d max(acc_count) by gender

I have a problem on the 23rd and 24th because there are no females and therefore the stacked chart shows nothing.
I am trying to show accumulative values so the chart should show 3 females on the 23rd and 24th like on the 22nd.

Anyone have an idea?

Tags (2)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

As an alternative, you can simplify your search a lot:

some search | timechart span=1d count as total_count by gender | streamstats sum(*) as *

No filldown needed.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

As an alternative, you can simplify your search a lot:

some search | timechart span=1d count as total_count by gender | streamstats sum(*) as *

No filldown needed.

noambz
Explorer

Great.
Didn't know about that * option.
That did the trick and is much simpler!

0 Karma

noambz
Explorer

Struggled with this for many hours but found the answer 20 min after posting....

filldown command did the trick!

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...