Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
My sample data is present in this link: https://1drv.ms/x/s!AucycxZHFe9TjTF2d36VklLNs7UN?e=gOenxH . I am trying to calculate the average difference between the installationdate column present in the file and today(). Here is my code for calculating:
Hi @Dunner2020,
Did these reply help with your scenario?
If this is a case, you can accept the most suitable one as a solution to help other users who faced the same issue. If not, please feel free to post here with detailed information.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi,
In cell D2, enter this formula and copy down
=DATEDIF(A2,TODAY(),"y")
Now if you average this column, the result is 40. So your DAX formulas is returning the correct result.
Hope this helps.
Your 40 result looks correct to me in both PBI and Excel. What formula are you using in Excel?
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
That's wired. I use the following approach.
First I create new column using following formula.
=DATEDIF(A2,TODAY(),"Y")
Then I calculate the average using Average() function to calculate the average value of new column.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |