7 Replies Latest reply on Sep 13, 2016 5:37 AM by Matthijs Blenkers

# New/Repeat Customers

Hi All,

I have made this work in the past, but no luck now.  I am trying to understand, by month and by product (filter on product), how many new customers have been added and how many were repeat for Jan 2015 to July YTD.  My date is called Year/Month, End Customer Number is the unique number for each customer, and Product is a calculated field for grouping products.

Right now I have:

Columns:

Measure (qty/sales) in the columns

Rows:

Year/Month

New/Repeat Calculation (as seen below)

IF [Year/Month] = { fixed [End Customer Number], [Product] : min([Year/Month]) } then 'New for' + " " + str([Product]) ELSE 'Repeat for' + " " + str([Product]) END

The above formula I tried, but it shows all "new" customers in Jan 2015 (no "repeat") and then everything is "repeat" after that with no "new."

Can anyone help?

• ###### 1. Re: New/Repeat Customers

What this formula({ fixed [End Customer Number], [Product] : min([Year/Month]) }) returns?

• ###### 2. Re: New/Repeat Customers

Just shows 1/1/2015 for each month.

*I blanked out sales/qty to protect the innocent*

• ###### 3. Re: New/Repeat Customers

All right.

You blanked but i need to know which lines shows values.

It would be nice to show [Year/Month] too.

• ###### 4. Re: New/Repeat Customers

All of them have values, but does not show what is new or repeat

• ###### 5. Re: New/Repeat Customers

This calculation will return 'new' for some rows and 'repeat' for other rows. It will behave differently depending on whether the pill has min or max aggregate. E.g. min would return 'new' when both new and repeat exist since new is "smaller" alphabetically while max would do the opposite.

• ###### 6. Re: New/Repeat Customers

Seth, it's time to you post a twbx even if with fake data.

• ###### 7. Re: New/Repeat Customers

Hi,

Noticed a couple off things in the formula. What if you use:

IF [Year/Month] = { fixed [End Customer Number], [Product] : min([Year/Month]) } then 'New for' + " " + [Product] ELSE 'Repeat for' + " " +[Product] END

So no string-function and (). Now it should generate a calculated dimension.