Dashboards & Visualizations

From multi-values event to splitted single-value events?

PeterGian
Engager

Hello community!
For a project I'm working on, I would need to split a "multivalues single event" into "multiple single value events".

Let me try to represent it for clarity:

As is:

Event:
A B C null D
E F G
H I L

Desired:

Event1:
A B C null D
Event2:
A B E F G
Event3:
A B H I L

 Is it possible to achieve this? 

I played around with mvexpand and mvzip but I wasn't able to reach my goal.

Thanks in advance for your kind support

Labels (1)
0 Karma

PeterGian
Engager

Works like a charm! Thanks

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please can you clarify the events you are actually dealing with, as the representation you have used is unclear.

For example, are there actually 5 fields in your event, the last 3 being multi-value fields, or are the last 3 actually 3 occurrences of 3 fields such that the first occurrence has no value for the second field of the 3, or does it actually contain the word "null"?

There are possibly other interpretations of your representation too.

0 Karma

PeterGian
Engager

Hello,

thanks for your interest.

In the event there are 5 fields and the last 3 are multi-value fields. You are right, the word "null" could be misleading in this context, it is just representing the word "null" so it could be changed with whatever value.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| fields - _time
| eval field1="A"
| eval field2="B"
| eval field3=split("CEH","")
| eval field4=split("null,F,I",",")
| eval field5=split("DGL","")
``` The lines above just set up data inline with your example ```
| eval combined=mvzip(field3,mvzip(field4,field5,"|"),"|")
| mvexpand combined
| eval field3=mvindex(split(combined,"|"),0)
| eval field4=mvindex(split(combined,"|"),1)
| eval field5=mvindex(split(combined,"|"),2)
| fields - combined
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...