4 Replies Latest reply: Oct 5, 2011 9:13 AM by Lucian Cotea RSS

    New customers in month

      Using a typical invoices table, I'm trying to calculate new customers in month in a chart with one dimension (Year-Month) and one expression (No of new customers)

       

      In the expression I'm trying to compare min(Date) with min(ALL <CustomerID> Date), but I fail. The closest formula I've got is:

       

      = count( DISTINCT

                 if( aggr( min(ALL <CustomerID> Date), CustomerID) = aggr( min( Date), CustomerID)

                    , CustomerID

                    )

               )

       

       

      I'm getting strange results, but I feel I'm close...