New Customer regardless of selected date

I have a sales table that gives me custID, Inv number, Sales Total, invoice date and has a start date of 1/1/2014. The invoice date is linked to my date table. I want to filter the date table to this year and last month. In this example, I would choose 2020 as year and July as the month. I want to see all the customers who purchased from me for the first time in July 2020. Meaning, they have never purchased anything from me since 1/1/2014, but in July 2020, they made their first purchase.

This has to be easy, right? For the life of me I can’t figure this out.

Hello @Usates,

Thank You for posting your query onto the Forum.

Well you can check out the following links of the videos as well as blog posts provided below where it covers this type of scenarios.

Hoping you find this useful. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Hi @Usates,

You will find this course covers the technique required for this type of analysis.

The measure below identifies the first date from the selected period.
Identifies all customers with purchases in that period
Collects all customers with purchases before the selected period and retains those that are in the first- but not in the second list.

New Customers = 
VAR BeforeDate = CALCULATE( MIN( Dates[Date] ), ALLSELECTED( Dates ))
VAR SelectedCustomers = VALUES( Sales[Customer Name Index] )
VAR PriorCustomers = 
    CALCULATETABLE( VALUES( Sales[Customer Name Index] ), 
        FILTER( ALL( Dates ), Dates[Date] < BeforeDate )
    )

RETURN

COUNTROWS( EXCEPT( SelectedCustomers, PriorCustomers )) 

.
I hope this is helpful.

It appears this solution works. All of the links supplied seems to deal with Churn Time. I don’t want to know if a customer has not purchased from me in the last 90 days, I want to only see customers that have never purchased from me. Thanks for the Dax solution.