<?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: reformating stats and eval output as columns and rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77122#M19512</link>
    <description>&lt;P&gt;perfect thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2013 09:01:02 GMT</pubDate>
    <dc:creator>rickl</dc:creator>
    <dc:date>2013-04-01T09:01:02Z</dc:date>
    <item>
      <title>reformating stats and eval output as columns and rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77120#M19510</link>
      <description>&lt;P&gt;I have the below search to output the values for response times for an application, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="summary_application_responcetimes" | stats 
max(CorpWeb_ResponceTime) as CorpWeb_ResponceTime 
max(DPSCC_ResponceTime) as DPSCC_ResponceTime 
max(TotalUser_ResponceTime) as TotalUser_ResponceTime 
| eval CorpWeb_Status=if(CorpWeb_ResponceTime &amp;gt; 30, 1, 0) 
| eval DPSCC_Status=if(DPSCC_ResponceTime&amp;gt; 10, 1, 0) 
| eval TotalUser_Status=if(TotalUser_ResponceTime &amp;gt; 30, 1, 0)
| eval MyApp = if(DPSCC_Status + CorpWeb_Status &amp;gt;= 1, 1, 0)

----------
The output is a single row with multiple columns

CorpWeb_ResponceTime DPSCC_ResponceTime TotalUser_ResponceTime CorpWeb_Status DPSCC_Status TotalUser_Status MyApp
2.802000000      5.93600000         60.115000000           0              0            1                 1
----------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but what I want is two columns with the values in the rows.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;            ResponceTime    Status
CorpWeb     2.802000000         0
DPSCC       5.936000000         0
TotalUser   60.115000000        1
MyApp                           1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried subsearchs and appendcols as well as transpose, Im sure its relatively straight forward but I can get the   commands/syntax correct&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2013 03:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77120#M19510</guid>
      <dc:creator>rickl</dc:creator>
      <dc:date>2013-03-28T03:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: reformating stats and eval output as columns and rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77121#M19511</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Untable"&gt;untable&lt;/A&gt; is your friend &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | untable "" measure value
    | rex field=measure "(?&amp;lt;field&amp;gt;[^_]+)(?:_(?&amp;lt;metric&amp;gt;.*))?"
    | fillnull value="Status" metric
    | xyseries field metric value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Add the lines 1 by one to see what they do.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/response_1.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2013 09:12:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77121#M19511</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-03-28T09:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: reformating stats and eval output as columns and rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77122#M19512</link>
      <description>&lt;P&gt;perfect thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2013 09:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reformating-stats-and-eval-output-as-columns-and-rows/m-p/77122#M19512</guid>
      <dc:creator>rickl</dc:creator>
      <dc:date>2013-04-01T09:01:02Z</dc:date>
    </item>
  </channel>
</rss>

