Getting Data In

Duplicated values on count

vinihei_987
New Member

When I do an stats count my field it return the double of the real number

index=raw_fe5_autsust Aplicacao=HUB Endpoint="*/"
| eval Agrupamento=if(Agrupamento!="", Agrupamento, "AGRUPAMENTO_HOLDING/CE")
| eval Timestamp=strftime(_time, "%Y-%m-%d")
| stats count by Agrupamento, Timestamp
| sort -Timestamp


I already tried dedup and when I count only by Timestamp it works fine

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If Agrupamento is a multi-value field, it will be counted for each value in the multivalue field

| makeresults
| eval field=split("AA","")
| stats count by field _time
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @vinihei_987 ,

are yousure that in some events you have only one Agrupamento?

probaby they are more than one in some (or all) events, so you have a total greter than events.

Ciao.

Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's not clear what the problem is.  Are you seeing repeated results or are the counts twice the expected values?  It may help to share sanitized output.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...