Splunk Search

How to give matching fields the same number ?

Newser703
Engager

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!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...