<?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: Change Row Values to Column Headings in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356705#M105532</link>
    <description>&lt;P&gt;Hi @rjthibod, many thanks for coming back to me with this.&lt;/P&gt;

&lt;P&gt;I made a slight adjustment and added a| fields - column at the end of the query.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 10:18:46 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2017-03-15T10:18:46Z</dc:date>
    <item>
      <title>Change Row Values to Column Headings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356703#M105530</link>
      <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I'm using the query below which extracts a column of fields associated with the index and auditSource:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=main) OR (index=dg_&amp;lt;indexname&amp;gt;) auditSource=&amp;lt;fieldvalue&amp;gt;
| fieldsummary 
| where like(field, "detail.%")
| fields field
| rename field as data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to change this so the row values become  the 'column' headers.&lt;/P&gt;

&lt;P&gt;I've tried using the 'transpose' command (below and also the 'chart over', but I can get neither to work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=main) OR (index=dg_tax-credits-submissions) auditSource=tax-credits-submissions
| fieldsummary 
| where like(field, "detail.%")
| fields field
| rename field as data
| transpose 0 header_field=data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just wondered whether someone may be able to look at this please and let me know where I've gone wrong.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 09:15:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356703#M105530</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2017-03-15T09:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change Row Values to Column Headings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356704#M105531</link>
      <description>&lt;P&gt;The &lt;CODE&gt;transpose&lt;/CODE&gt; command needs another column in the data in order to handle what you are trying to do.  You were correct in how to use the command, but the data preparation needs a bit more. This will add a count column that ends up being the only row after transpose. After that, you can remove that or change its contents depending on your use case.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (index=main) OR (index=dg_tax-credits-submissions) auditSource=tax-credits-submissions
| fieldsummary 
| where like(field, "detail.%")
| fields field
| rename field as data
| chart count by data
| transpose 0 header_field=data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Mar 2017 10:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356704#M105531</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-03-15T10:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change Row Values to Column Headings</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356705#M105532</link>
      <description>&lt;P&gt;Hi @rjthibod, many thanks for coming back to me with this.&lt;/P&gt;

&lt;P&gt;I made a slight adjustment and added a| fields - column at the end of the query.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 10:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-Row-Values-to-Column-Headings/m-p/356705#M105532</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2017-03-15T10:18:46Z</dc:date>
    </item>
  </channel>
</rss>

