Splunk Search

How to edit my "stats (count)" search to display a table?

Abarny
Path Finder

Hi guys, i have a question about the function stats count (fields) by field | where xxx .

I want just the result of my stats count with an any number but i have a table with this function. Can you tell me how i can do for do that. Thanks.

| stats count(AA) by BB
| where BB!=200
alt text

0 Karma
1 Solution

Abarny
Path Finder

Thanks but I have an other question about the eval function. When i do that :

|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)

I have a graphics with Moyenne count and days but if i want just display moyenne how i can remove count and days ?

Thanks for your answer.

View solution in original post

0 Karma

Abarny
Path Finder

Thanks but I have an other question about the eval function. When i do that :

|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)

I have a graphics with Moyenne count and days but if i want just display moyenne how i can remove count and days ?

Thanks for your answer.

0 Karma

nickhills
Ultra Champion
|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)
|table Moyenne
If my comment helps, please give it a thumbs up!

Abarny
Path Finder

It's okay i have founded. I need to say | table date_wday Moyenne.

Thanks you

0 Karma

adayton20
Contributor

You could just add |table count(AA) at the end of your search

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, ...