Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hi everyone,
Hope anyone can help, I get trouble when facing this issue:
I have 2 tables:
Dim_Customer ([CusID],[OpenDate])
fSales ([PurcharseDate],[CusID])
Connect by [CusID]
I want to calulate average number of days between Open Date and The first Purchase date of a group of Customer,
Can anyone help me how can I calculate it.
Thank you so much
Solved! Go to Solution.
@Anonymous , Try a new
avergageX(values(Dim_Customer[CusID]), datediff(min(Dim_Customer[OpenDate]), min(fSales[PurcharseDate]),day))
oh so sorry, I didn't descript my issue clearly,
@amitchandak I followed your solution but it has another problem:
I try this DAX:
--
there are some customers haven't had purchase yet (so their min(fSales[PurcharseDate]) is null) and some cases the OpenDate is after first PurcharseDate (because of special condition of my company), I want to calculate customers who has OpenDate <= the first PurchaseDate only.
How could it be?
Thank you
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |