Splunk Search

how to fetch upperbound value from Multi-value field

rsathish47
Contributor

Hi All,

I have multi-value field, I need to fetch last that mean upper bound value from Multi-value field. Length of the field will not be same ;(

Please help how to fetch upperbound value from Multi-value field.

Thanks
Sathish R

Tags (2)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Take a look at this:

| stats count | eval mv = "a b c d" | makemv mv | eval last = mvindex(mv, -1)

Calling mvindex(field, -1) will give you the last value regardless of length.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Take a look at this:

| stats count | eval mv = "a b c d" | makemv mv | eval last = mvindex(mv, -1)

Calling mvindex(field, -1) will give you the last value regardless of length.

martin_mueller
SplunkTrust
SplunkTrust

That'll work as well, but is a bit harder to maintain and might run slower too 😛

0 Karma

rsathish47
Contributor

thanks Marty.. i used like mentioned below

eval sa=mvindex(test,mvcount(test)-1)

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...