Forum Discussion
Date table (Pivot, unpivot?)
- 4 years ago
You need a date table, and your weeks need to have year indicators. Otherwise once you get 2 or more years, week 22 will be in different years.
When I get source data that only has info like this, adding the year is pretty easy. As for the date, you can use this method. It returns a table like this, that you can now create a relationship with a date table, and do your aggregations.I did this in Excel, so Open up Power Query and look at the Table query.
You need a date table, and your weeks need to have year indicators. Otherwise once you get 2 or more years, week 22 will be in different years.
When I get source data that only has info like this, adding the year is pretty easy. As for the date, you can use this method. It returns a table like this, that you can now create a relationship with a date table, and do your aggregations.
I did this in Excel, so Open up Power Query and look at the Table query.