1 Reply Latest reply on Mar 29, 2016 8:26 AM by Brian Winkle

    SQL and Salesforce datablending to calc existing customers

    Brian Winkle



      I need to chart existing customers over time. We consider a customer "existing" if they have made a purchase (we store each purchase's date and customer in the db) and they don't have a "last service" entry in Salesforce (this is a date).


      I've created a table with every available date in order to perform the calculation, but I don't appear to have it working:


      if (attr([First Purchase Date]) <= attr([Date Entry])

      AND ATTR([Accounts (Salesforce)].[Last Day of Service]) >= attr([Date Entry]))

      then "Active"

      ELSE "Inactive"



      Every customer is being listed as "Inactive". I wonder if the ATTR() function is causing this. Any ideas?