Forum Discussion
Convert Months to weeks
- 10 years ago
Hello everyone, I found a very simple solution ! I just split the total I had in colum (YTD) btw 52 weeks , and that result multiplied per the week we are currently ( week 25). Thank you all for your help ! :D
For this sort of thing it's usually best to have your fact table with a date column linked to a separate date table. That date table would have a continuous series of dates covering the full range you need, plus other columns with category info related to those dates (week, month, year, quarter). My preferred method for week is to use the last date of the week from the date in question. In your query you can write a custom column using the Date.EndOfWeek function.
Here's one version of the query I use to create date tables. There are lots of other examples around as well.