<?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: Stats: pulling forward data into table results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399190#M115740</link>
    <description>&lt;P&gt;@vnravikumar , thanks for the response. I tried eventstats, and that does pull the data forward, but it also duplicates Type, rather than having 1 result per type.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2019 19:02:47 GMT</pubDate>
    <dc:creator>pmhelfrich</dc:creator>
    <dc:date>2019-04-04T19:02:47Z</dc:date>
    <item>
      <title>Stats: pulling forward data into table results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399188#M115738</link>
      <description>&lt;P&gt;I am trying to create a table by counting rows, then doing a stats command on the results to determine the Avg, Max, and Min of those counts. I also want to pull 3 other values forward from the 1st stats command, that I want to remain untouched through the 2nd Stats command. &lt;/P&gt;

&lt;P&gt;Original data:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;Date Time | Filename | Transaction Count | Type
  4/13/19  |  abcde   |        5          | T1
  4/13/19  |  efghi   |        10         | T2
  4/14/19  |  jklmn   |        17         | T1
  4/14/19  |  opqrs   |        2          | T2
  4/15/19  |  tuvwx   |        20         | T2
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;My query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | bucket _time span=1d
    | stats count 
      avg(TRANS_COUNT) as AverageTransCount
      max(TRANS_COUNT) as MaxTransCount
      min(TRANS_COUNT) as MinTransCount by _time TYPE
    | table SERVICE_TYPE count AverageTransCount MaxTransCount MinTransCount
    | stats avg(count) as AverageFileCount
      max(count) as MaxFileCount
      min(count) as MinFileCount by TYPE
    | table TYPE AverageFileCount MaxFileCount MinFileCount AverageTransCount MaxTransCount MinTransCount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run the two stats commands separately, they work, but I can't figure out how to pull " AverageTransCount MaxTransCount MinTransCount" forward to the final results.&lt;/P&gt;

&lt;P&gt;I'd like my results to look like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| SERVICE_TYPE | AverageFileCount | MaxFileCount | MinFileCount | AverageTransCount | MaxTransCount | MinTransCount |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All help is much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 18:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399188#M115738</guid>
      <dc:creator>pmhelfrich</dc:creator>
      <dc:date>2019-04-04T18:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Stats: pulling forward data into table results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399189#M115739</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try with eventstats&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 18:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399189#M115739</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-04-04T18:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Stats: pulling forward data into table results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399190#M115740</link>
      <description>&lt;P&gt;@vnravikumar , thanks for the response. I tried eventstats, and that does pull the data forward, but it also duplicates Type, rather than having 1 result per type.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 19:02:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-pulling-forward-data-into-table-results/m-p/399190#M115740</guid>
      <dc:creator>pmhelfrich</dc:creator>
      <dc:date>2019-04-04T19:02:47Z</dc:date>
    </item>
  </channel>
</rss>

