I have two tables: a fact-table with hours spent, and a date dimensions table.
factTableHours:
| employeeName | hours | datekey |
dimDate: (from year 2000-2030)
| datekey | year | month | day |
I'm trying to create a simple estimate of how many hours an employee is going to spend in the future by looking at the hours he spent the last whole year.
It's similar to the SAMEPERIODLASTYEAR function, but i want a specific year based on today's date.
So, if I did it today, I would like it to return the time registered in 2015,
in order to get an estimate of how many hours he will spend in the coming years, 2016, 2017, 2018...