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!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...