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
I need to calculate the average of a measure that calculates the difference in weeks between two dates. The problem is that the start date and end date are in the same column that is, I have more than one record and what I do to calculate the number of weeks elapsed is to take the maximum for that record the minimum for that record and then subtract them, the number of elapsed weeks is calculated perfect, But now I'm trying to calculate the average of that measure and I can't figure it out.
| Category | Registration Date |
| Registration A | Date 1 |
| Registration A | Date 2 |
| Registration A | Date 3 |
My measurement does the following QTY Weeks = DATEDIFF(min(DateRecord]),max([DateRecord]),WEEK)
What I want to calculate is AVERAGE(QTY Weeks)
Thank you!
Solved! Go to Solution.
Hello, try this measure:
Thank you very much Perfect work!
Thank you :). Could you please accept this as solution. Best regards.
BTW, you dont actually need the addcolumns, although is more intuitive. You can just do the averagex (Values,expression)
Hello, try this measure:
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.