Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
User | Count |
---|---|
77 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
100 | |
91 | |
83 | |
61 |