<?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 Re: How to combine multiple rows (from sub search results) into different columns on single row (main search) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549768#M156017</link>
    <description>&lt;P&gt;You can't have duplicate column names. To get the results in one row, try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Column1,Column2
A1,A2
B1,B2
C1,C2
D1,D2"
| multikv forceheader=1
| table Column1,Column2
| streamstats count as row
| foreach * 
    [ eval columnvalues=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="row",columnvalues,if(isnull(columnvalues),&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,mvappend(columnvalues,&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;)))]
| fields columnvalues
| mvexpand columnvalues
| transpose 0
| where column="columnvalues"&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 29 Apr 2021 07:56:22 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-04-29T07:56:22Z</dc:date>
    <item>
      <title>How to combine multiple rows (from sub search results) into different columns on single row (main search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549761#M156013</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-subject-content"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;&lt;DIV class="topic-subject-wrapper"&gt;&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-author"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-right lia-quilt-column-message-post-times-content"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-message-post-date lia-component-post-date lia-component-message-view-widget-post-date"&gt;&lt;SPAN&gt;I have a query that returns the following result.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-body"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-body-content"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Column 1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Column 2&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A1&lt;/TD&gt;&lt;TD&gt;A2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B1&lt;/TD&gt;&lt;TD&gt;B2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D1&lt;/TD&gt;&lt;TD&gt;D2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I would like to transform it to something like this&lt;/P&gt;&lt;TABLE border="1" width="99.21875%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="14.062500000000002%" height="25px"&gt;&lt;STRONG&gt;1st&amp;nbsp; row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.588541666666659%" height="25px"&gt;&lt;STRONG&gt;1st row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="12.63020833333333%" height="25px"&gt;&lt;STRONG&gt;2nd row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="13.151041666666668%" height="25px"&gt;&lt;STRONG&gt;&amp;nbsp;2nd row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="11.458333333333332%" height="25px"&gt;&lt;STRONG&gt;3 rd row&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10.026041666666668%" height="25px"&gt;&lt;STRONG&gt;3rd row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10.807291666666668%" height="25px"&gt;&lt;STRONG&gt;4th row&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="15.494791666666666%" height="25px"&gt;&lt;STRONG&gt;4th row&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.062500000000002%" height="25px"&gt;A1&lt;/TD&gt;&lt;TD width="11.588541666666659%" height="25px"&gt;A2&lt;/TD&gt;&lt;TD width="12.63020833333333%" height="25px"&gt;B1&lt;/TD&gt;&lt;TD width="13.151041666666668%" height="25px"&gt;B2&lt;/TD&gt;&lt;TD width="11.458333333333332%" height="25px"&gt;&amp;nbsp;C1&lt;/TD&gt;&lt;TD width="10.026041666666668%" height="25px"&gt;&amp;nbsp;C2&lt;/TD&gt;&lt;TD width="10.807291666666668%" height="25px"&gt;&amp;nbsp;D1&lt;/TD&gt;&lt;TD width="15.494791666666666%" height="25px"&gt;&amp;nbsp;D2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Column1,Column2
A1,A2
B1,B2
C1,C2
D1,D2"
| multikv forceheader=1
| table Column1,Column2

|.......&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 07:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549761#M156013</guid>
      <dc:creator>Raymond2T</dc:creator>
      <dc:date>2021-04-29T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rows (from sub search results) into different columns on single row (main search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549768#M156017</link>
      <description>&lt;P&gt;You can't have duplicate column names. To get the results in one row, try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Column1,Column2
A1,A2
B1,B2
C1,C2
D1,D2"
| multikv forceheader=1
| table Column1,Column2
| streamstats count as row
| foreach * 
    [ eval columnvalues=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"="row",columnvalues,if(isnull(columnvalues),&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,mvappend(columnvalues,&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;)))]
| fields columnvalues
| mvexpand columnvalues
| transpose 0
| where column="columnvalues"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Apr 2021 07:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549768#M156017</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-29T07:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple rows (from sub search results) into different columns on single row (main search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549798#M156038</link>
      <description>&lt;P&gt;Thank you so much. It is good solution&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 09:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-rows-from-sub-search-results-into/m-p/549798#M156038</guid>
      <dc:creator>Raymond2T</dc:creator>
      <dc:date>2021-04-29T09:59:55Z</dc:date>
    </item>
  </channel>
</rss>

