Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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:
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 39 | |
| 31 | |
| 27 |