I have a table with sales data starting from 1/1/2015 to current (as of today it would be 3/7/2021). I also have a separate date table that's linked to the sales date.
My total sales orders for each year from 2015 to 2020 is as follows:
- 2015: 1847
- 2016: 1698
- 2017: 1134
- 2018: 1036
- 2019: 1127
- 2020: 1136
- 2021: 121
How can I calculate the average of total orders per year for the first 5 years (2015 to 2020)? The average should be 1,330 order per year. If I use the formula below it takes into account the current year (2021) which I don't want because 2021 has not been completed yet.
Total Orders = DISTINCTCOUNT('Sales'[Order])
Avg. Annual Orders = AVERAGEX(
VALUES('Date'[Year]),
[Total Orders])