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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

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