<?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 How to find users who have done an event A, but not done an event B display as timechart span of 1 month? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/597906#M208200</link>
    <description>&lt;P&gt;I want to convert the result from&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Find-users-who-have-done-an-event-A-but-not-done-an-event-B/m-p/110560" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Find-users-who-have-done-an-event-A-but-not-done-an-event-B/m-p/110560&lt;/A&gt;&amp;nbsp;into monthly timechart.&lt;/P&gt;
&lt;P&gt;I have tried the following query, but does not work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="x" (event="A" OR event="B")
    | stats count(eval(event="A")) as ACount count(eval(event="B")) as Bcount by userId
    | where ACount &amp;gt;= 1 AND BCount &amp;lt; 1
    | timechart span=1mon count as result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me with this query?&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 15:21:31 GMT</pubDate>
    <dc:creator>asdinesh</dc:creator>
    <dc:date>2022-05-20T15:21:31Z</dc:date>
    <item>
      <title>How to find users who have done an event A, but not done an event B display as timechart span of 1 month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/597906#M208200</link>
      <description>&lt;P&gt;I want to convert the result from&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Find-users-who-have-done-an-event-A-but-not-done-an-event-B/m-p/110560" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Find-users-who-have-done-an-event-A-but-not-done-an-event-B/m-p/110560&lt;/A&gt;&amp;nbsp;into monthly timechart.&lt;/P&gt;
&lt;P&gt;I have tried the following query, but does not work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="x" (event="A" OR event="B")
    | stats count(eval(event="A")) as ACount count(eval(event="B")) as Bcount by userId
    | where ACount &amp;gt;= 1 AND BCount &amp;lt; 1
    | timechart span=1mon count as result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me with this query?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 15:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/597906#M208200</guid>
      <dc:creator>asdinesh</dc:creator>
      <dc:date>2022-05-20T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find users who have done an event A, but not done an event B display as timechart span of 1 month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/597907#M208201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245834"&gt;@asdinesh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;after a stats command you have only the fields that you used in the stats, so you don't have _time so you cannot use timechart after the stats command.&lt;/P&gt;&lt;P&gt;To do this, you have to add the _time field to the stats command, taking e.g. the latest value, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="x" (event="A" OR event="B")
| stats count(eval(event="A")) AS ACount count(eval(event="B")) AS Bcount latest(_time) AS _time BY userId
| where ACount &amp;gt;= 1 AND BCount &amp;lt; 1
| timechart span=1mon count AS result&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 08:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/597907#M208201</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-16T08:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find users who have done an event A, but not done an event B display as timechart span of 1 month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/598640#M208451</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion, but it does not return any time chart, it shows "No results found". I don't think I can use the latest(_time) here as it might break the monthly time chart. I need to first assort the events into monthly buckets or something. Any suggestions on that?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 09:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/598640#M208451</guid>
      <dc:creator>asdinesh</dc:creator>
      <dc:date>2022-05-20T09:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find users who have done an event A, but not done an event B display as timechart span of 1 month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/598641#M208452</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245834"&gt;@asdinesh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to use earliest or latest is a your decision that doens't move the approach.&lt;/P&gt;&lt;P&gt;If you haven't any result check the conditions, you can debug all searches deleting, one by one, rows from the end and understanding which is the one that block results.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 09:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-users-who-have-done-an-event-A-but-not-done-an-event/m-p/598641#M208452</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-20T09:59:21Z</dc:date>
    </item>
  </channel>
</rss>

