<?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: Reformat table so values become Column headings in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Reformat-table-so-values-become-Column-headings/m-p/233921#M69515</link>
    <description>&lt;P&gt;Hi DanielFordWA,&lt;/P&gt;

&lt;P&gt;Try the below search, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats sum(count) AS Hits by _time GUID cs_uri_stem | eval time=strftime(_time,"%+") | eval temp=time+"##"+GUID| table temp cs_uri_stem Hits | xyseries temp, cs_uri_stem Hits | fillnull | rex field=temp "(?&amp;lt;time&amp;gt;.*)##(?&amp;lt;GUID&amp;gt;.*)" | fields - temp | table time, GUID *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have combined _time and GUID by "##"  named as temp field, used xyseries to format the results as you expect. later extract the time and GUID from temp field. &lt;/P&gt;

&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
V&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jan 2016 12:59:42 GMT</pubDate>
    <dc:creator>vasanthmss</dc:creator>
    <dc:date>2016-01-15T12:59:42Z</dc:date>
    <item>
      <title>Reformat table so values become Column headings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reformat-table-so-values-become-Column-headings/m-p/233920#M69514</link>
      <description>&lt;P&gt;I have a search that ends with&lt;/P&gt;

&lt;P&gt;| stats sum(count) AS Hits by _time GUID cs_uri_stem&lt;/P&gt;

&lt;P&gt;Which results in a table &lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/81205-satb1.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I would like to reformat the table as follows, but have had some difficulty.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/81206-satb2.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Any help much appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reformat-table-so-values-become-Column-headings/m-p/233920#M69514</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2020-09-29T08:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reformat table so values become Column headings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reformat-table-so-values-become-Column-headings/m-p/233921#M69515</link>
      <description>&lt;P&gt;Hi DanielFordWA,&lt;/P&gt;

&lt;P&gt;Try the below search, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats sum(count) AS Hits by _time GUID cs_uri_stem | eval time=strftime(_time,"%+") | eval temp=time+"##"+GUID| table temp cs_uri_stem Hits | xyseries temp, cs_uri_stem Hits | fillnull | rex field=temp "(?&amp;lt;time&amp;gt;.*)##(?&amp;lt;GUID&amp;gt;.*)" | fields - temp | table time, GUID *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have combined _time and GUID by "##"  named as temp field, used xyseries to format the results as you expect. later extract the time and GUID from temp field. &lt;/P&gt;

&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
V&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 12:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reformat-table-so-values-become-Column-headings/m-p/233921#M69515</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2016-01-15T12:59:42Z</dc:date>
    </item>
  </channel>
</rss>

