Splunk Search

Distribution function using bin

mtatulda
New Member

I am trying to create a PDF and CDF with limited amount of buckets:

... | bucket bins=10 fs as fsBinned
| stats count(fs) as pdf by fsBinned
| sort fsBinned
| accum pdf as cdf
| eventstats max(cdf) as totalMax
| eval fsPDF = 10*pdf/totalMax
| eval fsCDF = cdf/totalMax
| table fsBinned, fsPDF, fsCDF

However, the fsBinned variable does not chage if I decrease the number of bins. The table shows that the resulting buckets are mixed together with the input fs variable, like this:

0, 0-100, 14, 15...

Is this a normal behavior or is this a bug? I am using Splunk 7.2.10

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...

4 Ways the Splunk Community Helps You Prepare for .conf25

.conf25 is right around the corner, and whether you’re a first-time attendee or a seasoned Splunker, the ...