<?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 to create a table of eval fields along with stats in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371966#M7139</link>
    <description>&lt;P&gt;Awesome.. this solution worked !&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 18:14:31 GMT</pubDate>
    <dc:creator>shah_nishay</dc:creator>
    <dc:date>2017-10-02T18:14:31Z</dc:date>
    <item>
      <title>How to create a table of eval fields along with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371964#M7137</link>
      <description>&lt;P&gt;I have a query where I eval 3 fields by substracting different timestamps&lt;/P&gt;

&lt;P&gt;eval Field1 = TS1-TS2&lt;BR /&gt;
eval Field2 = TS3-TS4&lt;BR /&gt;
eval Field3 = TS5- TS6&lt;BR /&gt;
eval Date = strftime(_time, "%m-%d-%Y")&lt;BR /&gt;
Next I use the stats command to calculate  count, min,max,average for these 3 evaluated Fields by date.&lt;/P&gt;

&lt;P&gt;If use stats count(Field1), count(Field2),count(Field3) by Date then I end up with all the values in same row.&lt;BR /&gt;
How can i get these stats for each Fields in different line ?&lt;BR /&gt;
i.e my out put should look like :&lt;/P&gt;

&lt;P&gt;Date,Fields,Min,Max,Avg&lt;BR /&gt;
10/2/2017, Field1,5,10,8&lt;BR /&gt;
10/2/2017, Field2,15,110,30&lt;BR /&gt;
10/2/2017, Field3,11,102,58&lt;BR /&gt;
10/3/2017, Field1,15,110,28&lt;BR /&gt;
10/3/2017, Field2,25,210,100&lt;BR /&gt;
10/3/2017, Field3,12,110,60&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 16:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371964#M7137</guid>
      <dc:creator>shah_nishay</dc:creator>
      <dc:date>2017-10-02T16:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table of eval fields along with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371965#M7138</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search
| eval Field1 = TS1-TS2
| eval Field2 = TS3-TS4
| eval Field3 = TS5- TS6
| eval Date = strftime(_time, "%m-%d-%Y") | table Date Field1 Field2 Field3
| untable Date Fields Value
| stats min(Value) as Min max(Value) as Max avg(Value) as Avg by Date Fields
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 17:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371965#M7138</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-10-02T17:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table of eval fields along with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371966#M7139</link>
      <description>&lt;P&gt;Awesome.. this solution worked !&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 18:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-a-table-of-eval-fields-along-with-stats/m-p/371966#M7139</guid>
      <dc:creator>shah_nishay</dc:creator>
      <dc:date>2017-10-02T18:14:31Z</dc:date>
    </item>
  </channel>
</rss>

