<?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: Timechart: First time purchasers and total purchasers per day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127391#M34551</link>
    <description>&lt;P&gt;Additionally, post the two single queries you would use.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2013 14:20:42 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-11-04T14:20:42Z</dc:date>
    <item>
      <title>Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127389#M34549</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;i would like to create a timechart for  unique users who made at least one action="purchase" a day. I need the total count of unique purchasers and the count of unique users who made their first lifetime purchase on that day.&lt;/P&gt;

&lt;P&gt;01.01.2013 ,  10000 ,  2000&lt;/P&gt;

&lt;P&gt;This means:&lt;/P&gt;

&lt;P&gt;On 01.01.2013 10000 unique users did a purchase. Out of these 10000,  2000 unique Users did their first lifetime purchase on that day. I would be able to create something like with two different searches and write the outputs in a single excelsheet afterwards. But it would be great to have it in one single splunk search.&lt;/P&gt;

&lt;P&gt;Thanks for help&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 13:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127389#M34549</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2013-11-04T13:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127390#M34550</link>
      <description>&lt;P&gt;could you provide sample event for  this scenario&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 13:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127390#M34550</guid>
      <dc:creator>adityapavan18</dc:creator>
      <dc:date>2013-11-04T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127391#M34551</link>
      <description>&lt;P&gt;Additionally, post the two single queries you would use.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 14:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127391#M34551</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-11-04T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127392#M34552</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;the single searches i would use here and combine externally:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;to get the dc(user) per day&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;STRONG&gt;| timechart dc(eval(if(action="purchase", user, null())))&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;to get every purchasers first day&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;STRONG&gt;| stats min(eval(if(action="purchase", __time, null()))) by user | eval day=strftime(_time, "%d.%m.%Y")&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;A count per day could be calculated out of the second search and could be added to the first table.&lt;/P&gt;

&lt;P&gt;Best&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127392#M34552</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-09-28T15:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127393#M34553</link>
      <description>&lt;P&gt;Without thinking about precise syntax, here's an approach that should work:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;start with your base search before these two reporting pipes&lt;/LI&gt;
&lt;LI&gt;replace the stats call with an eventstats, computing the first day by user&lt;/LI&gt;
&lt;LI&gt;bin by day&lt;/LI&gt;
&lt;LI&gt;stats dc(blah) count(eval(_time==first_day))&lt;/LI&gt;
&lt;LI&gt;maybe some cosmetics&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127393#M34553</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2020-09-28T15:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127394#M34554</link>
      <description>&lt;P&gt;Thanks for the input. I got some questions regarding this:&lt;/P&gt;

&lt;P&gt;What does "bin by day" mean?&lt;BR /&gt;
And in what kind of format do I need "first day" here to compare it to _time? Unixtime?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 09:59:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127394#M34554</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2013-11-08T09:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127395#M34555</link>
      <description>&lt;P&gt;... | bin span=1d | ...&lt;/P&gt;

&lt;P&gt;After that &lt;CODE&gt;_time&lt;/CODE&gt; will be in unixtime (seconds since 1970) rounded down to midnight. If your &lt;CODE&gt;first_time&lt;/CODE&gt; is a date as a string (ie "2013-11-08") you can use &lt;CODE&gt;strftime(_time, "%Y-%m-%d")&lt;/CODE&gt; to convert the timestamp to the same format.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127395#M34555</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-11-08T10:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127396#M34556</link>
      <description>&lt;P&gt;Ah ok, so it seems to have the same effect as | bucket span=1d _time |&lt;/P&gt;

&lt;P&gt;I've got the "first_time" as timestamp in seconds. So I have to use the bin command here as well, to be able to compare both timestamps. My approach would be this now and it seems to work:&lt;/P&gt;

&lt;P&gt;| bin span=1d first_time&lt;BR /&gt;
| bin span=1d _time&lt;BR /&gt;
| timechart span=1d dc(user) AS Total_Users, dc(eval(if(_time=first_time, user, null()))) AS "New Users"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:14:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127396#M34556</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-09-28T15:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127397#M34557</link>
      <description>&lt;P&gt;Yep, &lt;CODE&gt;_time&lt;/CODE&gt; is the default field for &lt;CODE&gt;bin&lt;/CODE&gt;, and &lt;CODE&gt;bin&lt;/CODE&gt; is an alias for &lt;CODE&gt;bucket&lt;/CODE&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127397#M34557</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-11-08T10:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart: First time purchasers and total purchasers per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127398#M34558</link>
      <description>&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-First-time-purchasers-and-total-purchasers-per-day/m-p/127398#M34558</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2013-11-08T10:47:56Z</dc:date>
    </item>
  </channel>
</rss>

