Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |