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
Hello community,
I have the following (simplified) data. I want to calculate the average of three years based on below table and show that value for the according year:
| Year | YearQuarter | Value |
| 2013 | 2013-01 | 20 |
| 2013 | 2013-02 | 40 |
| 2013 | 2013-03 | 35 |
| 2013 | 2013-04 | 10 |
| 2014 | 2014-01 | 44 |
| 2014 | 2014-02 | 16 |
| 2014 | 2014-03 | 15 |
| 2014 | 2014-04 | 10 |
| 2015 | 2015-01 | 61 |
| 2015 | 2015-02 | 35 |
| 2015 | 2015-03 | 22 |
| 2015 | 2015-04 | 20 |
And this would be the expected output for 2015:
| Year | Value | Average of 3 years |
| 2013 | 105 | … |
| 2014 | 85 | … |
| 2015 | 138 | 109 |
109 = (105 + 85 + 138) / 3
I hope you have an idea here because I am stuck.
Thank you.
Solved! Go to Solution.
Hi, @tonyclifton
Please check the below picture and the sample pbix file's link down below.
Hi, @tonyclifton
Please check the below picture and the sample pbix file's link down below.
Hey there,
Is there a way that this would work to have it per month rather than per year?
Hi,
Thank you for your message, and please provide a sample pbix file with how the expected outcome looks like, and then I can try to look into it.
Thank you.
Hey @tonyclifton ,
depending if you want to calculate whole years or from the max date or filter date you can use different approaches.
Check the function DATESINPERIOD function (DAX) - DAX | Microsoft Docs or PARALLELPERIOD function (DAX) - DAX | Microsoft Docs that can both extend the filter context of your date to 3 years.
Also be aware you need a proper date table in order to make the time intelligence functions work:
https://softcrylic.com/blogs/power-bi-for-beginners-how-to-create-a-date-table-in-power-bi/
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |