Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Number of new Customer and Number of inactive Customers

I'm begginner in dax, and I can't figure out how to solve this : 

 

My dataset is : 

- OrderDate

- CustomerID

 

Number of new customer = Customer which first order is lower than 30 days versus today()

Number of inactive customer = Customer which last order is higher than 30 days versus today()

 

Any idea ?

Thanks,

C.

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 
Create the following measures: 

Number of new customer  = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),DATEDIFF([OrderDate],TODAY(),DAY)<30))

Number of inactive customer = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),DATEDIFF([OrderDate],TODAY(),DAY)>30))

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you for your answer,

 

Unfortunatelly your calculation for new customer take all customers, I need to retrive the first sales > than 30 days. Not the last sale even if the customer odered before the last 30 days. Same for inactive.

 

Regards. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors