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!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...