LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Count of New Purchases - Agg Ex issue

    Employee
    Posted 11-18-2015 12:33

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tessam

    Hey All, hoping for some help!

    My colleague and I are stuck on a node that is not pulling through our "conversions" correctly.

    Here's the concept:
    -Data covers several years of activity.
    -Within the data, we have an event date month.
    -We want to see if an account "begins to purchase" after the event.
    -We are attempting to get the node to look backwards in our data - by several years.
    -We want to have a sum of all of our "new purchasers".

    Here is a screenshot of the current logic:

    Get Conversions.JPG
    Attachments:
    Get Conversions.JPG


  • 2.  RE: Count of New Purchases - Agg Ex issue

    Employee
    Posted 11-18-2015 15:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    I'm not quite sure what you're asking to do.. it would help to see some sample data.

    Making some assumptions:

    If you sort by Account and Event then run an AGG per Account, you could calculate:
    1) Number of Purchases
    2) Date of most recent Purchase

    Then, you could filter down to the accounts that have more than one purchase and where the most recent purchase was in the last month:

    c=count()
    last=groupMax(PurchaseDate)
    emit *
    where lastInGroup and c>1 and last > date().dateAdjust(-1,"months")


  • 3.  RE: Count of New Purchases - Agg Ex issue

    Employee
    Posted 11-18-2015 22:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    Hi, Tessa!

    Yes, some sample data would be great. Are you trying to count the instances where Conv is equal to "Y"? If so, you can use the Agg Ex and use a groupCount(Conv == "Y") to get that. But that doesn't take the Rev_Date (event date?) into consideration. What's the logic around the event date?
    Attachments:
    nPurchases.brg


  • 4.  RE: Count of New Purchases - Agg Ex issue

    Employee
    Posted 11-19-2015 05:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tessam

    What we would like to do is have a look backwards to see if an account number had purchased prior to the event. Then, if they purchase during the month of the event and any time after, we want to count that as a conversion. If the account number didn't "show up" having purchased prior to the event but then did appear in our data after the event, then we could count that as a conversion.

    Essentially we want to count the number of accounts who "converted" into becoming a buyer of defined products following our event.

    There are several different sources of data in this graph and for the sake of confidentiality, I cannot share the raw data.

    Originally posted by: stonysmith
    					

    I'm not quite sure what you're asking to do.. it would help to see some sample data.

    Making some assumptions:

    If you sort by Account and Event then run an AGG per Account, you could calculate:
    1) Number of Purchases
    2) Date of most recent Purchase

    Then, you could filter down to the accounts that have more than one purchase and where the most recent purchase was in the last month:

    c=count()
    last=groupMax(PurchaseDate)
    emit *
    where lastInGroup and c>1 and last > date().dateAdjust(-1,"months")


  • 5.  RE: Count of New Purchases - Agg Ex issue

    Employee
    Posted 11-24-2015 09:52

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dtigue

    Hi,

    Is there only one event date across the whole dataset? If so then I would use the split node to split the data into before and after event, and then use a x-ref to compare the accounts that purchased before with the accounts that purchased after (either left or right orphans would be your new purchasers).
    If the event date is not static, and is different for each purchaser, then you will need to first identify if the purchase was before or after the event, so something like:
    Period = if Purchase_Date>=Event_Date then "After" else "Before"
    emit *, Period

    Then you can split as per the above only this time on the 'Period' field, and then use the x-ref