<?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 find the most recent event for a user preceding some other event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43805#M10314</link>
    <description>&lt;P&gt;Thanks for the answer, but could you offer any more detail please as I'm still not clear how I would do that?  E.g. suppose in a very simple example I have&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;userid 1, eventtype A&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 2, eventtype B&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype "Exception"&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype C&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype "Exception"&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 2, eventtype "Exception"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Here I'd want to see that 1/3 of the time the preceding event was A, 1/3 of the time it was B and 1/3 of the time it was C...&lt;/P&gt;</description>
    <pubDate>Wed, 27 Feb 2013 06:37:31 GMT</pubDate>
    <dc:creator>MatMeredith</dc:creator>
    <dc:date>2013-02-27T06:37:31Z</dc:date>
    <item>
      <title>How to find the most recent event for a user preceding some other event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43803#M10312</link>
      <description>&lt;P&gt;I have a set of user activity logs, each of which identifies an event-type and a user-id.  One possible event-type is "Exception" and when a user hits an "Exception" I want to know what other event type most commonly precedes it for the user.  Specifically I'd like a table that shows me how often the most recent previous event is X, Y, Z etc.&lt;/P&gt;

&lt;P&gt;I'm struggling to see how to do this.  Can anyone help please?&lt;/P&gt;

&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2013 12:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43803#M10312</guid>
      <dc:creator>MatMeredith</dc:creator>
      <dc:date>2013-02-26T12:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the most recent event for a user preceding some other event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43804#M10313</link>
      <description>&lt;P&gt;You could use streamstats to append the previous event to the current event, and then use that to build your table.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2013 14:44:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43804#M10313</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-26T14:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the most recent event for a user preceding some other event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43805#M10314</link>
      <description>&lt;P&gt;Thanks for the answer, but could you offer any more detail please as I'm still not clear how I would do that?  E.g. suppose in a very simple example I have&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;userid 1, eventtype A&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 2, eventtype B&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype "Exception"&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype C&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 1, eventtype "Exception"&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;LI&gt;userid 2, eventtype "Exception"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Here I'd want to see that 1/3 of the time the preceding event was A, 1/3 of the time it was B and 1/3 of the time it was C...&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 06:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43805#M10314</guid>
      <dc:creator>MatMeredith</dc:creator>
      <dc:date>2013-02-27T06:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the most recent event for a user preceding some other event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43806#M10315</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats current=f window=1 last(eventtype) as other_eventtype by userid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2013 08:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-most-recent-event-for-a-user-preceding-some/m-p/43806#M10315</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-27T08:25:15Z</dc:date>
    </item>
  </channel>
</rss>

