6 Replies Latest reply on Jan 8, 2019 12:36 AM by Hideki OGAWA

    Get a fixed number of new customers for a specific timerange

    Max Bahne

      Hey everyone,

       

      I am facing a problem with a new customer-calculation. The dataset I am working with is transactional data on customer ID level (that's why I am not allowed to share the workbook) and currently I am working with this LOD-expression to sum up new customers for a specific timerange:

      IF { FIXED [Customer ID] : MIN([Date]) } == { FIXED [Customer ID] : MAX([Date]) }

          THEN 1

      ELSE 0

      END

       

      The problem is: The dataset grows over time, because new transactions happen. If a customer ID returns, it is not counted as a new customer anymore. That leads to inconsistent information: If I filter for new customers for the exemplary daterange 01.03.18-31.03.18, I receive x new customers, if I wait for a month and filter for the same daterange again, I get x-y new customers, because there is a small amount of customer IDs which have returned (y) in this month and they were not counted as new customers anymore.

       

      Is there a way to prevent this from happening? I already tried context filtering and INCLUDE instead if FIXED (so LOD get's evaluated after the date-filter), but none of these approaches worked.

       

      In my opinion it should be the best solution if there is a way to limit the customer IDs, which are evaluated for the above calculation. If I can set a filter like "Only look at the customer IDs to this point" (in my example until 31.03.18), the above calculation should only use the IDs to this point and the amount of new customers should be fixed for every query, regardless when you do the query. Unfortunately I don't have any ideas how to implement this without using the Python-extension for Tableau. Do you have any ideas?

       

      Thank you and best regards,

       

      Max