<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic mvexpand multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402639#M116509</link>
    <description>&lt;P&gt;Is there a way to use mvexpand on multitple values?&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5263i6DF11B9F8B9770EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This is the result of my current search and I want it to look like this below. Note that there will multiple multivalue fields so i cannot use the mvzip or can I?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SESSIONID    Timstamp    Value1   Value2  Value3 
1             06/21        1         2      3 
1             06/22        2         3      4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 25 Jun 2018 08:24:01 GMT</pubDate>
    <dc:creator>michaelrosello</dc:creator>
    <dc:date>2018-06-25T08:24:01Z</dc:date>
    <item>
      <title>mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402639#M116509</link>
      <description>&lt;P&gt;Is there a way to use mvexpand on multitple values?&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5263i6DF11B9F8B9770EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This is the result of my current search and I want it to look like this below. Note that there will multiple multivalue fields so i cannot use the mvzip or can I?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SESSIONID    Timstamp    Value1   Value2  Value3 
1             06/21        1         2      3 
1             06/22        2         3      4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jun 2018 08:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402639#M116509</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2018-06-25T08:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402640#M116510</link>
      <description>&lt;P&gt;First use &lt;CODE&gt;mvzip&lt;/CODE&gt; the multi-values into a new field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval total=mvzip(value1, value2)    // create multi-value field using value1 and value2
 | eval total=mvzip(total, value3)  // add the third field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, Expand the field and restore the values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | mvexpand total                    // separate multi-value into into separate events
 | makemv total delim=","            // convert the reading into a multi-value
 | eval value1=mvindex(total, 0)      // set value1 to the first value of total
 | eval value2=mvindex(total, 1)      // set value2 to the second value of total
 | eval value3=mvindex(total, -1)     // set value3 to the last value of total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jun 2018 08:46:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402640#M116510</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-06-25T08:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402641#M116511</link>
      <description>&lt;P&gt;To what extend would such an approach risk mixing up the connection between different 'rows' in the multi valued fields? Can you be sure that the first entry in multi valued field1 corresponds with the first entry in multi valued field2?&lt;/P&gt;

&lt;P&gt;Might be safer to extract it as 1 field to begin with, then expand and only then split out to the individual fields?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 09:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402641#M116511</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-25T09:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402642#M116512</link>
      <description>&lt;P&gt;Please check this solution: &lt;A href="https://answers.splunk.com/answers/724138/"&gt;https://answers.splunk.com/answers/724138/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 10:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402642#M116512</guid>
      <dc:creator>madan27</dc:creator>
      <dc:date>2019-04-09T10:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402643#M116513</link>
      <description>&lt;P&gt;Can you close out this question by choosing @493669 answer? &lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 21:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402643#M116513</guid>
      <dc:creator>ryhluc01</dc:creator>
      <dc:date>2019-04-16T21:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402644#M116514</link>
      <description>&lt;P&gt;The -1 @ the end is recapturing the second result instead of the last. To fix this just remove the "-" in the last eval. &lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 22:10:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvexpand-multiple-fields/m-p/402644#M116514</guid>
      <dc:creator>ryhluc01</dc:creator>
      <dc:date>2019-04-16T22:10:28Z</dc:date>
    </item>
  </channel>
</rss>

