<?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 How to Split multi valued row in to different rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471653#M132697</link>
    <description>&lt;P&gt;I have a below query which shows the recent windows patches installed in the servers, So most of the servers got installed with multiple patches. When i sort the result by Server name it is giving the result in single row joining all the multiple patch names and dates installed. Could some one tell me how to break the values and show them in different lines as 2nd image. Below is my query and results. Thyank you!!&lt;/P&gt;

&lt;P&gt;Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=AAA sourcetype="AAA:change"  | search ci_patching_group IN ("CHS*" "GISC*" "JPN*") | search name IN (*)
| eval filterdate = strptime(start_date,"%Y-%m-%d")
| eval Currentdate = relative_time(now(),"-0d@d")
| where filterdate &amp;lt; Currentdate
| eval servers=Upper(name) | search servers IN (*)
| eval start=strptime(start_date, "%Y-%m-%d %H:%M:%S.%N") 
| eval day = strftime(start, "%a") 
| eval month = strftime(start, "%B") | search month="*" | table servers number ci_patching_group
| join servers [search index="BBB" sourcetype="windowsupdatelog" | search "*Patch Deployment*" OR "*AGENT_INSTALLING_SUCCEEDED*" OR "*successfully installed*"| search host IN (*)
| rex field=_raw "^(?:[^:\n]*:){9}\s+(?P.+)" 
| eval servers = Upper(mvindex(split(host,"."),-0
| eval start=strftime(_time, "%Y-%m-%d %H:%M:%S:%N %A")
| eval day = strftime(start, "%a") 
| eval month = Upper(date_month) 
| stats values(ApplicablePatch) as ApplicablePatch values(start) as start by servers month ] | table ci_patching_group ApplicablePatch start servers month
| chart values(ci_patching_group) as ci_patching_group values(ApplicablePatch) as InstalledPatch values(start) as start by servers month  | mvexpand ApplicablePatch | fillnull value="Not Patched"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what I see when I run this query:&lt;/P&gt;

&lt;P&gt;&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/7629i25D1A10375C5B43C/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;And this is how I wanted to be:&lt;/P&gt;

&lt;P&gt;&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/7630i02A4BB2E913D6B24/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 19:34:25 GMT</pubDate>
    <dc:creator>vinaykataaig</dc:creator>
    <dc:date>2019-09-04T19:34:25Z</dc:date>
    <item>
      <title>How to Split multi valued row in to different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471653#M132697</link>
      <description>&lt;P&gt;I have a below query which shows the recent windows patches installed in the servers, So most of the servers got installed with multiple patches. When i sort the result by Server name it is giving the result in single row joining all the multiple patch names and dates installed. Could some one tell me how to break the values and show them in different lines as 2nd image. Below is my query and results. Thyank you!!&lt;/P&gt;

&lt;P&gt;Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=AAA sourcetype="AAA:change"  | search ci_patching_group IN ("CHS*" "GISC*" "JPN*") | search name IN (*)
| eval filterdate = strptime(start_date,"%Y-%m-%d")
| eval Currentdate = relative_time(now(),"-0d@d")
| where filterdate &amp;lt; Currentdate
| eval servers=Upper(name) | search servers IN (*)
| eval start=strptime(start_date, "%Y-%m-%d %H:%M:%S.%N") 
| eval day = strftime(start, "%a") 
| eval month = strftime(start, "%B") | search month="*" | table servers number ci_patching_group
| join servers [search index="BBB" sourcetype="windowsupdatelog" | search "*Patch Deployment*" OR "*AGENT_INSTALLING_SUCCEEDED*" OR "*successfully installed*"| search host IN (*)
| rex field=_raw "^(?:[^:\n]*:){9}\s+(?P.+)" 
| eval servers = Upper(mvindex(split(host,"."),-0
| eval start=strftime(_time, "%Y-%m-%d %H:%M:%S:%N %A")
| eval day = strftime(start, "%a") 
| eval month = Upper(date_month) 
| stats values(ApplicablePatch) as ApplicablePatch values(start) as start by servers month ] | table ci_patching_group ApplicablePatch start servers month
| chart values(ci_patching_group) as ci_patching_group values(ApplicablePatch) as InstalledPatch values(start) as start by servers month  | mvexpand ApplicablePatch | fillnull value="Not Patched"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what I see when I run this query:&lt;/P&gt;

&lt;P&gt;&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/7629i25D1A10375C5B43C/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;And this is how I wanted to be:&lt;/P&gt;

&lt;P&gt;&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/7630i02A4BB2E913D6B24/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 19:34:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471653#M132697</guid>
      <dc:creator>vinaykataaig</dc:creator>
      <dc:date>2019-09-04T19:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Split multi valued row in to different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471654#M132698</link>
      <description>&lt;P&gt;@vinaykataaig  The first screenshot is so small it's not really readable. Can you post a larger version? Also, some sample events from each index/sourcetype would be helpful. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471654#M132698</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2019-09-04T20:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Split multi valued row in to different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471655#M132699</link>
      <description>&lt;P&gt;try something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=AAA sourcetype="AAA:change" 
| search ci_patching_group IN ("CHS*" "GISC*" "JPN*") 
| search name IN (*) 
| eval filterdate = strptime(start_date,"%Y-%m-%d") 
| eval Currentdate = relative_time(now(),"-0d@d") 
| where filterdate &amp;lt; Currentdate 
| eval servers=Upper(name) 
| search servers IN (*) 
| eval start=strptime(start_date, "%Y-%m-%d %H:%M:%S.%N") 
| eval day = strftime(start, "%a") 
| eval month = strftime(start, "%B") 
| search month="*" 
| table servers number ci_patching_group 
| join servers 
    [ search index="BBB" sourcetype="windowsupdatelog" 
    | search "*Patch Deployment*" OR "*AGENT_INSTALLING_SUCCEEDED*" OR "*successfully installed*" 
    | search host IN (*) 
    | rex field=_raw "^(?:[^:\n]*:){9}\s+(?P.+)" 
    | eval servers = Upper(mvindex(split(host,"."),-0 
    | eval start=strftime(_time, "%Y-%m-%d %H:%M:%S:%N %A") 
    | eval day = strftime(start, "%a") 
    | eval month = Upper(date_month) 
    | stats values(ApplicablePatch) as ApplicablePatch values(start) as start by servers month ] 
| table ci_patching_group ApplicablePatch start servers month 
| rex field=ApplicablePatch mode=sed "s/(\d{4}\-\d{2})/|\1/g" 
| makemv ApplicablePatch delim="|" 
| mvexpand ApplicablePatch 
| chart values(ci_patching_group) as ci_patching_group values(ApplicablePatch) as InstalledPatch values(start) as start by servers month 
| fillnull value="Not Patched"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Split-multi-valued-row-in-to-different-rows/m-p/471655#M132699</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-09-04T20:57:32Z</dc:date>
    </item>
  </channel>
</rss>

