Splunk Search

How to assign numeric values based on counts?

yagbootz48
New Member

Hello,

I need some help. I'm trying to make a search where I take recipient_count and assign a "value" based on how many recipients there are. For example, recipient_count greater than or equal to 25 value=5, recipient_count range is between 50-99 value=7, recipient_count greater than or equal to 100 value=9

Any ideas how I could accomplish this?

Thanks in advance!

0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

try something like below,

| your base search
| eval value=case(recipient_count>=25 AND recipient_count<=50 ,5,recipient_count>50 AND recipient_count<=99,7,recipient_count>=100,9)
————————————
If this helps, give a like below.

View solution in original post

yagbootz48
New Member

@thambisetty thanks!

0 Karma

woodcock
Esteemed Legend
0 Karma

thambisetty
SplunkTrust
SplunkTrust

try something like below,

| your base search
| eval value=case(recipient_count>=25 AND recipient_count<=50 ,5,recipient_count>50 AND recipient_count<=99,7,recipient_count>=100,9)
————————————
If this helps, give a like below.
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...