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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...