Splunk Search

Stats Values(x) command is giving unexpected results

dheera
New Member

Hi Team,

Stats values command in pivot(data model) is giving unexpected results. For ex below search
| pivot A_pivot B_object values(X) AS X_1 SPLITROW Y total count is C but expected count is C*2 which is very low. Please look into it. Please let us know in case you need more info.

Tags (2)
0 Karma

yannK
Splunk Employee
Splunk Employee

Are you saying that the count is low, or that the values (X_1) is low ?

Values(myfield) return the distinct list of values.

so with
A=1
A=2
A=3
A=1
A=2

A | stats values(A)

will return 1,2,3 not 1,2,3,1,2

0 Karma

lguinn2
Legend

There is no example given. We need a lot more data: we need to know about the object and the underlying events.

Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...