Forum Discussion

EnviroJack's avatar
EnviroJack
Frequent Visitor
7 years ago
Solved

New and Returning Customer calculated Column issue

Hello all   I am trying to identify new customers with a transaction over a threshold (250), this is defined as "Part" or "Full" Order. I want to identify a first time customers with a new order. T...
  • EnviroJack's avatar
    EnviroJack
    7 years ago

    I think I've solved this with the following.

     

    Any thoughts on another way to do this welcom. Thanks

     

    New Customer =
    VAR firstorder =
    Calculate ( Min (Invoices[Date]) ,
    ALLEXCEPT ( 'Invoices', 'Invoices'[ContactId]),
    'Invoices'[ContactId] = EARLIER ( 'Invoices'[ContactId] ), FILTER(Invoices ,Invoices[Full Order] = "Full" ))

    RETURN

    IF (Invoices[Full Order] = "Part", "N/A" , IF (firstorder = Invoices[Date], "New" , "Return" ))