- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to count the number of values?
raghul725
Explorer
05-21-2023
06:25 AM
Hello
I would like to count the number of values every time the search matches the string alternativeIdValue- i.e. after the = count the values separated by ,
alternativeIdValue=IE778898,WX888889,IS89657578,XS76575889.............................................
The length of each value can be different and the only common pattern is they are separated by comma and they start with an alphabet.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
05-21-2023
07:44 AM
Assuming alternativeIdValue is already a field, try this
| eval count=mvcount(split(alternativeIdValue,","))
