<?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 field values into a column using chart command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98642#M25398</link>
    <description>&lt;P&gt;Thanks - this is a much better answer! I thought of concatenating the fields, but didn't consider how to split them again after the stats.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2012 23:40:02 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-03-21T23:40:02Z</dc:date>
    <item>
      <title>Change field values into a column using chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98640#M25396</link>
      <description>&lt;P&gt;I have the following search: stats count by jvm category host&lt;/P&gt;

&lt;P&gt;This returns a table with the headings count, jvm, host, category &lt;/P&gt;

&lt;P&gt;Category has 4 different values in it and I would like to make those each a column header so that my table would have the headings count, jvm, host, category 1, category 2, category 3, category 4.&lt;/P&gt;

&lt;P&gt;I have tried using the chart command to do this. However it will not allow me to group on jvm and host. Regardless of whether I use "chart sum(count) by host,category,jvm" or "chart sum(count) over jvm by host,category" it will not recognize a "third field". "chart sum(count) by host,category" or "chart sum(count) over jvm by host" work just fine.&lt;/P&gt;

&lt;P&gt;Any suggestions on how to do this? using either the chart command or something else?&lt;BR /&gt;
(I am using version 4.3.1)&lt;/P&gt;

&lt;P&gt;Thanks!&lt;BR /&gt;
Sarah&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 19:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98640#M25396</guid>
      <dc:creator>SarahWKarvenz</dc:creator>
      <dc:date>2012-03-21T19:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change field values into a column using chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98641#M25397</link>
      <description>&lt;P&gt;You need something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval hj=host+";"+jvm | chart count by hj,category | eval hj=split(hj,";") | eval host=mvindex(hj,0) | eval jvm=mvindex(hj,1) | fields - hj
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which will work regardless of what your category values are.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 23:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98641#M25397</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-03-21T23:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change field values into a column using chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98642#M25398</link>
      <description>&lt;P&gt;Thanks - this is a much better answer! I thought of concatenating the fields, but didn't consider how to split them again after the stats.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 23:40:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-field-values-into-a-column-using-chart-command/m-p/98642#M25398</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-03-21T23:40:02Z</dc:date>
    </item>
  </channel>
</rss>

