Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
@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.
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!