Splunk Search

Distinct values

SplnkUse
Path Finder

Hello

 

I am running a * search in an app and it returns several columns in the csv extract where a column is named 'source'.

 

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

 

Any idea?

 

thanks!

Labels (2)
Tags (1)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

values and distinct  are not  commands.  Have you tried stats?

| stats values(source) dc(source)

 

View solution in original post

Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

values and distinct  are not  commands.  Have you tried stats?

| stats values(source) dc(source)

 

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| dedup source
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...