Splunk Search

isuue with inputlookup file to expand multi values

james_n
Path Finder

Hi Experts,

I have a inputlookup file which consists of two fields i,e _time and names fields as shown below,

_time names
02/02/2020 user1
user2
08/02/2020 user1
user2
user3
10/02/2020 user2

I want to expand multi value filed i.e, names filed and show unique users list based on time, i tried |inputlookup filename.csv |stats values(names) as name |mvexpand name |dedup name |table name| sort - name but not worked for me,.
Please help on this, Thanks in advance.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@james_n

Are you looking for this?

| inputlookup filename.csv | rex mode=sed "s/(\n)/,/g" field=names | eval names=split(names,",") | stats values(names) as name by _time
0 Karma
Get Updates on the Splunk Community!

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

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 ...