Splunk Search

Convert multiple value to single value.

abhishekpatel2
Explorer

I want to map multiple value field to one single value field.

Ex:

COL1     |     COL2

VAL1     |     Val11

                      Val12

VAL2     |     Val21

                      Val22

                     Val23

And the output I want is:

COL1     |     COL2

VAL1     |     Val11,VAL12

VAL1     |     Val21,VAL22,VAL23

 

Labels (1)
0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @abhishekpatel2 

Can you try this?

<your_search_goes_here> 
| eval new_COL2=mvjoin(COL2,",") 
| table COL1 new_COL2

---

An upvote would be appreciated and Accept solution if this reply helps!

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...