<?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 transpose rows of one column into multiple columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571465#M199143</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239822"&gt;@cjkar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think simple eval can help you on this.&amp;nbsp;Can you please try this with your search?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH | eval ENV=mvindex(VALUES,0),APP=mvindex(VALUES,2),LOC=mvindex(VALUES,2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="hostname,VALUES
HOST1,ENV1|APP1|LOC1
HOST2,ENV2|APP2|LOC2" | multikv forceheader=1 | eval VALUES=split(VALUES,"|")
| rename comment as "Upto now is for sample data only"
| table hostname,VALUES | eval ENV=mvindex(VALUES,0),APP=mvindex(VALUES,2),LOC=mvindex(VALUES,2)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;KV&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 06:07:34 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-10-19T06:07:34Z</dc:date>
    <item>
      <title>How to transpose rows of one column into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571464#M199142</link>
      <description>&lt;P&gt;I currently have multiple entries in the VALUES column for each host.&lt;/P&gt;&lt;P&gt;The table currently looks like:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="44.44572188510166%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;hostname&lt;/TD&gt;&lt;TD width="25%"&gt;VALUES&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;HOST1&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;P&gt;ENV1&lt;/P&gt;&lt;P&gt;APP1&lt;/P&gt;&lt;P&gt;LOC1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;HOST2&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;P&gt;ENV2&lt;/P&gt;&lt;P&gt;APP2&lt;/P&gt;&lt;P&gt;LOC2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the table to read as:&lt;/P&gt;&lt;TABLE border="1" width="280px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="114.425px"&gt;hostname&lt;/TD&gt;&lt;TD width="62.225px"&gt;ENV&lt;/TD&gt;&lt;TD width="50.825px"&gt;APP&lt;/TD&gt;&lt;TD width="51.525px"&gt;LOC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="114.425px"&gt;HOST1&lt;/TD&gt;&lt;TD width="62.225px"&gt;ENV1&lt;/TD&gt;&lt;TD width="50.825px"&gt;APP1&lt;/TD&gt;&lt;TD width="51.525px"&gt;LOC1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="114.425px"&gt;HOST2&lt;/TD&gt;&lt;TD width="62.225px"&gt;&lt;P&gt;ENV2&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50.825px"&gt;&lt;P&gt;APP2&lt;/P&gt;&lt;/TD&gt;&lt;TD width="51.525px"&gt;&lt;P&gt;LOC2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am essentially trying to transpose the column "VALUE" and create 3 separate columns with the custom headings "ENV,APP and LOC"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 05:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571464#M199142</guid>
      <dc:creator>cjkar</dc:creator>
      <dc:date>2021-10-19T05:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to transpose rows of one column into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571465#M199143</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239822"&gt;@cjkar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think simple eval can help you on this.&amp;nbsp;Can you please try this with your search?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH | eval ENV=mvindex(VALUES,0),APP=mvindex(VALUES,2),LOC=mvindex(VALUES,2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="hostname,VALUES
HOST1,ENV1|APP1|LOC1
HOST2,ENV2|APP2|LOC2" | multikv forceheader=1 | eval VALUES=split(VALUES,"|")
| rename comment as "Upto now is for sample data only"
| table hostname,VALUES | eval ENV=mvindex(VALUES,0),APP=mvindex(VALUES,2),LOC=mvindex(VALUES,2)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;KV&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 06:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571465#M199143</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-10-19T06:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to transpose rows of one column into multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571566#M199170</link>
      <description>&lt;P&gt;Worked perfectly thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 23:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-rows-of-one-column-into-multiple-columns/m-p/571566#M199170</guid>
      <dc:creator>cjkar</dc:creator>
      <dc:date>2021-10-19T23:10:16Z</dc:date>
    </item>
  </channel>
</rss>

