<?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 transpose rows into multiple columns based on grouping? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-transpose-rows-into-multiple-columns-based-on-grouping/m-p/75141#M18985</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a query which fetches me the below result in a table:&lt;/P&gt;

&lt;H2&gt;Thread          |   Total_Run_Time&lt;/H2&gt;

&lt;P&gt;READER_1_1_1 303.971798&lt;/P&gt;

&lt;P&gt;READER_1_1_1 151.724136&lt;/P&gt;

&lt;P&gt;READER_1_2_1 303.97251&lt;/P&gt;

&lt;P&gt;READER_1_2_1 151.728481&lt;/P&gt;

&lt;P&gt;TRANSF_1_1_1 310.477318&lt;/P&gt;

&lt;P&gt;TRANSF_1_1_1 157.788452&lt;/P&gt;

&lt;P&gt;TRANSF_1_2_1 310.480424&lt;/P&gt;

&lt;P&gt;TRANSF_1_2_1 157.791372&lt;/P&gt;

&lt;P&gt;WRITER_1_*_1 310.985073&lt;/P&gt;

&lt;P&gt;WRITER_1_*_1 159.198983&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I want all the distinct values(number is dynamic) under 'Thread' as columns with corresponding values from Total_Run_Time&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I need the result like this:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;READER_1_1_1_Total_Run_Time |  READER_1_2_1_Total_Run_Time |   TRANSF_1_1_1_Total_Run_Time |   TRANSF_1_2_1_Total_Run_Time | WRITER_1_*_1_Total_Run_Time&lt;/P&gt;

&lt;P&gt;303.971798     303.97251          310.477318      310.480424 310.985073&lt;/P&gt;

&lt;P&gt;151.724136 151.728481 157.788452 157.791372 159.198983&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Edit based on the suggestion:&lt;/STRONG&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;The query suggested by asimagu "| chart list(Total_Run_Time) over date_hour by Thread" gave the below result:&lt;/P&gt;

&lt;P&gt;date_hour  READER_1_1_1 READER_1_2_1 TRANSF_1_1_1 TRANSF_\1_\2_1   WRITER_\1_*_\1&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;17 (303.971798 151.724136) (303.97251 151.728481) (310.477318 157.788452) (310.480424 157.791372) (310.985073 159.198983)     &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;How to make a line chart of true values of these fields  by columns (like READER_1_1_1 with 303.971798, 151.724136) as these are multivalue fields?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;please suggest&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:10:17 GMT</pubDate>
    <dc:creator>trkalva</dc:creator>
    <dc:date>2020-09-28T14:10:17Z</dc:date>
    <item>
      <title>how to transpose rows into multiple columns based on grouping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-transpose-rows-into-multiple-columns-based-on-grouping/m-p/75141#M18985</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a query which fetches me the below result in a table:&lt;/P&gt;

&lt;H2&gt;Thread          |   Total_Run_Time&lt;/H2&gt;

&lt;P&gt;READER_1_1_1 303.971798&lt;/P&gt;

&lt;P&gt;READER_1_1_1 151.724136&lt;/P&gt;

&lt;P&gt;READER_1_2_1 303.97251&lt;/P&gt;

&lt;P&gt;READER_1_2_1 151.728481&lt;/P&gt;

&lt;P&gt;TRANSF_1_1_1 310.477318&lt;/P&gt;

&lt;P&gt;TRANSF_1_1_1 157.788452&lt;/P&gt;

&lt;P&gt;TRANSF_1_2_1 310.480424&lt;/P&gt;

&lt;P&gt;TRANSF_1_2_1 157.791372&lt;/P&gt;

&lt;P&gt;WRITER_1_*_1 310.985073&lt;/P&gt;

&lt;P&gt;WRITER_1_*_1 159.198983&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I want all the distinct values(number is dynamic) under 'Thread' as columns with corresponding values from Total_Run_Time&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I need the result like this:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;READER_1_1_1_Total_Run_Time |  READER_1_2_1_Total_Run_Time |   TRANSF_1_1_1_Total_Run_Time |   TRANSF_1_2_1_Total_Run_Time | WRITER_1_*_1_Total_Run_Time&lt;/P&gt;

&lt;P&gt;303.971798     303.97251          310.477318      310.480424 310.985073&lt;/P&gt;

&lt;P&gt;151.724136 151.728481 157.788452 157.791372 159.198983&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Edit based on the suggestion:&lt;/STRONG&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;The query suggested by asimagu "| chart list(Total_Run_Time) over date_hour by Thread" gave the below result:&lt;/P&gt;

&lt;P&gt;date_hour  READER_1_1_1 READER_1_2_1 TRANSF_1_1_1 TRANSF_\1_\2_1   WRITER_\1_*_\1&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;17 (303.971798 151.724136) (303.97251 151.728481) (310.477318 157.788452) (310.480424 157.791372) (310.985073 159.198983)     &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;How to make a line chart of true values of these fields  by columns (like READER_1_1_1 with 303.971798, 151.724136) as these are multivalue fields?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;please suggest&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-transpose-rows-into-multiple-columns-based-on-grouping/m-p/75141#M18985</guid>
      <dc:creator>trkalva</dc:creator>
      <dc:date>2020-09-28T14:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose rows into multiple columns based on grouping?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-transpose-rows-into-multiple-columns-based-on-grouping/m-p/75142#M18986</link>
      <description>&lt;P&gt;have a play with &lt;/P&gt;

&lt;P&gt;chart &lt;YOUR_METRIC&gt; over &lt;YOUR_FIRST_FIELD&gt; by &lt;YOUR_SECOND_FIELD&gt;&lt;/YOUR_SECOND_FIELD&gt;&lt;/YOUR_FIRST_FIELD&gt;&lt;/YOUR_METRIC&gt;&lt;/P&gt;

&lt;P&gt;that should do the magic, I don't know what your search looks like but maybe play putting your field names in one or other position in the command I just gave you&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 21:42:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-transpose-rows-into-multiple-columns-based-on-grouping/m-p/75142#M18986</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2013-06-25T21:42:12Z</dc:date>
    </item>
  </channel>
</rss>

