<?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: Transpose 1 columns from table with 4 columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643274#M222829</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/56406"&gt;@acharlieh&lt;/a&gt; your recommendation did the trick what I needed now.&lt;/P&gt;&lt;P&gt;Yes, your assumption is right the table comes from stats command, I will try to play with it more, but for now the first solution helped, thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 May 2023 21:02:22 GMT</pubDate>
    <dc:creator>verothor</dc:creator>
    <dc:date>2023-05-13T21:02:22Z</dc:date>
    <item>
      <title>How to transpose one column from table with four columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643271#M222827</link>
      <description>&lt;P&gt;Hi all, I have a table where I would like to transpose only one column with values from another column.&lt;/P&gt;
&lt;P&gt;It looks like this..&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;Order&lt;/TD&gt;
&lt;TD width="25%"&gt;Date&lt;/TD&gt;
&lt;TD width="25%"&gt;Count&lt;/TD&gt;
&lt;TD width="25%"&gt;Shift&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;M5678&lt;/TD&gt;
&lt;TD&gt;01/01/2023&lt;/TD&gt;
&lt;TD&gt;12&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;M5678&lt;/TD&gt;
&lt;TD&gt;01/01/2023&lt;/TD&gt;
&lt;TD&gt;13&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;M1234&lt;/TD&gt;
&lt;TD width="25%"&gt;01/01/2023&lt;/TD&gt;
&lt;TD width="25%"&gt;13&lt;/TD&gt;
&lt;TD width="25%"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;M1234&lt;/TD&gt;
&lt;TD width="25%"&gt;01/01/2023&lt;/TD&gt;
&lt;TD width="25%"&gt;15&lt;/TD&gt;
&lt;TD width="25%"&gt;B&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 achieve this..&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;Order&lt;/TD&gt;
&lt;TD width="25%"&gt;Date&lt;/TD&gt;
&lt;TD width="25.379266750948165%"&gt;A&lt;/TD&gt;
&lt;TD width="24.620733249051835%"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;M5678&lt;/TD&gt;
&lt;TD width="25%"&gt;01/01/2023&lt;/TD&gt;
&lt;TD width="25.379266750948165%"&gt;12&lt;/TD&gt;
&lt;TD width="24.620733249051835%"&gt;13&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;M1234&lt;/TD&gt;
&lt;TD width="25%"&gt;01/01/2023&lt;/TD&gt;
&lt;TD width="25.379266750948165%"&gt;13&lt;/TD&gt;
&lt;TD width="24.620733249051835%"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please help with this.&lt;/P&gt;
&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643271#M222827</guid>
      <dc:creator>verothor</dc:creator>
      <dc:date>2023-05-15T13:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose 1 columns from table with 4 columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643273#M222828</link>
      <description>&lt;P&gt;I'll highly recommend&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/3514"&gt;@alacercogitatus&lt;/a&gt;&amp;nbsp;"Lesser Known Search Commands" perennial .conf talk, because this is where I learned the {} trick with eval.&lt;BR /&gt;&lt;BR /&gt;It looks like you want to create columns based on the value of the Shift column...&amp;nbsp;&lt;BR /&gt;Which eval could do with the trick above, and then you can combine rows based on Order and Date parameters with stats:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| eval SH_{Shift}=Count
| stats values(SH_*) as * by Order Date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Alternatively, assuming that your given data is in fact the output of a stats command, another option would be instead of doing the stats, combine Order and Date into a single key with a delimiter, and then chart the count of your data by Order_Date and Shift.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You then use eval / rex / others to split Order and Date back out by the delimiter into separate columns.&lt;BR /&gt;&lt;BR /&gt;But I'll leave that option as an exercise to the reader.&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2023 18:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643273#M222828</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2023-05-13T18:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose 1 columns from table with 4 columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643274#M222829</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/56406"&gt;@acharlieh&lt;/a&gt; your recommendation did the trick what I needed now.&lt;/P&gt;&lt;P&gt;Yes, your assumption is right the table comes from stats command, I will try to play with it more, but for now the first solution helped, thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2023 21:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transpose-one-column-from-table-with-four-columns/m-p/643274#M222829</guid>
      <dc:creator>verothor</dc:creator>
      <dc:date>2023-05-13T21:02:22Z</dc:date>
    </item>
  </channel>
</rss>

