<?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 use Streamstats command with conditions added ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577871#M201372</link>
    <description>Yes you should use "BY account_number" to reset those calculations when account number changed.</description>
    <pubDate>Thu, 09 Dec 2021 10:29:32 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2021-12-09T10:29:32Z</dc:date>
    <item>
      <title>How to use Streamstats command with conditions added ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577862#M201367</link>
      <description>&lt;P&gt;my tablular output contains columns/fields like,&lt;BR /&gt;account_number | colour | team_name |&amp;nbsp; business_unit&lt;BR /&gt;&lt;BR /&gt;I am getting the above output by stats aggregating BY 'account_number'.&lt;BR /&gt;Some of the events with the same account_number has null (colour,&amp;nbsp; team_name and&amp;nbsp; business_unit) values. So I used ,&lt;BR /&gt;| streamstats last(colour) as colour,&lt;BR /&gt;last(team_name ) as team_name ,&lt;BR /&gt;last(team_name ) as team_name .&lt;BR /&gt;to populate from the previous row values.&lt;BR /&gt;&lt;BR /&gt;I want streamstats to populate the empty fields with the previous row value, "ONLY IF, the previous row "account_number" is same with the current row".&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The issue I am getting now is, lets say. I have three rows with account_number value 0001. and if 4th row has account_number is 0002 and has other three fields&amp;nbsp;(colour,&amp;nbsp; team_name and&amp;nbsp; business_unit) empty, it is populating them with the previous 0001 account_number's value , which is incorrect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 08:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577862#M201367</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2021-12-09T08:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Streamstats command with conditions added ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577864#M201369</link>
      <description>Hi&lt;BR /&gt;have you already try "reset_on_change=true" ?&lt;BR /&gt;r. Ismo</description>
      <pubDate>Thu, 09 Dec 2021 09:01:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577864#M201369</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-12-09T09:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Streamstats command with conditions added ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577870#M201371</link>
      <description>&lt;P&gt;No, I haven't.&lt;BR /&gt;&lt;BR /&gt;Is this the correct way of using it ?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;| streamstats last(colour) as colour,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;last(team_name ) as team_name ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;last(team_name ) as team_name&amp;nbsp;&amp;nbsp;&lt;BR /&gt;reset_on_change=true&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Also, do I have to use the BY clause here ?&lt;BR /&gt;BY &amp;lt;the field comparing which I want the reset to be applied, 'account_number' field&amp;gt;&amp;nbsp; &amp;nbsp;???&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 10:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577870#M201371</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2021-12-09T10:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Streamstats command with conditions added ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577871#M201372</link>
      <description>Yes you should use "BY account_number" to reset those calculations when account number changed.</description>
      <pubDate>Thu, 09 Dec 2021 10:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Streamstats-command-with-conditions-added/m-p/577871#M201372</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-12-09T10:29:32Z</dc:date>
    </item>
  </channel>
</rss>

