I have a set of records with multiple duplicate values across two fields X, and Y. I would like to write a splunk query to find distinct X, and its corresponding Y value. I am completely lost, and have no clue on how to come up with this query. Can someone please help?
Asked
Active
Viewed 9,009 times
3 Answers
4
What you're looking for is probably as simple as
| dedup X Y | table X Y
This will find all distinct combinations of X and Y and remove all duplicates, then display the result in a table.

Syon
- 7,205
- 5
- 36
- 40
-
Perfect.. Thanks :) – Breen ho Sep 18 '18 at 07:47
2
stats values(x) by y
or
stats values(y) by x
Depending on how you want to view the data. Per Splunk documentation, "In a distributed environment, stats is likely to be faster, because the indexers can "prestats" before sending their results to the search head"

sk8asd123
- 1,665
- 16
- 14