<?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: How can I convert column value to column? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413661#M119222</link>
    <description>&lt;P&gt;Are you sure you're using chart command like the one you showed (probably missing aggregate function)? If your chart command is &lt;CODE&gt;...| chart &amp;lt;&amp;lt;some aggregation&amp;gt;&amp;gt; BY DateHour zone&lt;/CODE&gt;, then you should get the output#2 which you need. You're not using stats right?&lt;/P&gt;</description>
    <pubDate>Mon, 21 May 2018 21:40:42 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-05-21T21:40:42Z</dc:date>
    <item>
      <title>How can I convert column value to column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413660#M119221</link>
      <description>&lt;P&gt;I have the following output from my query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;**Search Query** | eval DateHour=year."-".month."-".day."-".hour | chart event_count BY DateHour, zone&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DateHour      |  event_count              |  zone
2018-04-10              14                     A
2018-04-10              14                     B
2018-04-11              18                     A
2018-04-11              18                     B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What can I do to convert my table to something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DateHour              |  A                |     B
2018-04-10              14                     14
2018-04-11              18                     18
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 May 2018 19:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413660#M119221</guid>
      <dc:creator>liondancer</dc:creator>
      <dc:date>2018-05-21T19:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert column value to column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413661#M119222</link>
      <description>&lt;P&gt;Are you sure you're using chart command like the one you showed (probably missing aggregate function)? If your chart command is &lt;CODE&gt;...| chart &amp;lt;&amp;lt;some aggregation&amp;gt;&amp;gt; BY DateHour zone&lt;/CODE&gt;, then you should get the output#2 which you need. You're not using stats right?&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 21:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413661#M119222</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-21T21:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert column value to column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413662#M119223</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_query_to_get_first_output&amp;gt;| chart values(event_count) over date_hour by zone
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 06:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413662#M119223</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-05-22T06:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert column value to column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413663#M119224</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval DateHour="2018-04-10" 
| eval event_count=14 
| eval zone = "A" 
| fields - _time 
| append
    [| makeresults | eval DateHour="2018-04-10" 
| eval event_count=14 
| eval zone = "B" | fields - _time ]
| append
    [| makeresults | eval DateHour="2018-04-11" 
| eval event_count=18 
| eval zone = "A" | fields - _time ]
| append
    [| makeresults | eval DateHour="2018-04-11" 
| eval event_count=18
| eval zone = "B" | fields - _time ] 

| chart values(event_count) over DateHour by zone
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 May 2018 07:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-column-value-to-column/m-p/413663#M119224</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-05-22T07:11:07Z</dc:date>
    </item>
  </channel>
</rss>

