Splunk Search

How to give matching fields the same number ?

Newser703
Explorer

Hello, I have data that look like this :

Month   Key     Value   Number
------------------------------
Jan     Key1     50      1
Feb     Key1     57      2
Mar     Key1     51      3
Jan     Key2     101     4
Feb     Key2     107     5
Mar     Key2     98      6
Jan     Key3     701     7
Feb     Key3     703     8
Mar     Key3     712     9

And I would like it to look like that :

Month   Key     Value   Number
------------------------------
Jan     Key1     50      1
Feb     Key1     57      1
Mar     Key1     51      1
Jan     Key2     101     2
Feb     Key2     107     2
Mar     Key2     98      2
Jan     Key3     701     3
Feb     Key3     703     3
Mar     Key3     712     3

Is it possible ? Thanks.

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

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats dc(Key) as Number

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats dc(Key) as Number
Get Updates on the Splunk Community!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...