Forum Discussion
Rapaille
Helper I
1 year agoDate based on year and week
Hello all,
In Power BI Power Query I want to create a date table. The end day is today and my startday should be the date of the calculated Monday of the week and year columns.
Can someone help me with this?
Thank you in advance for your help.
Kind regards,
Hans
For StartDate, go to the "Add Column" tab and select "Custom Column" :
Date.AddDays(Date.FromText(Text.From([Year]) & "-01-01"), (([Week] - 1) * 7) - Date.DayOfWeek(Date.FromText(Text.From([Year]) & "-01-01"))and for the Enddate :
DateTime.Date(DateTime.LocalNow())If you can provide some data, it will be helpful 🙂
2 Replies
- AmiraBedh
Super User
For StartDate, go to the "Add Column" tab and select "Custom Column" :
Date.AddDays(Date.FromText(Text.From([Year]) & "-01-01"), (([Week] - 1) * 7) - Date.DayOfWeek(Date.FromText(Text.From([Year]) & "-01-01"))and for the Enddate :
DateTime.Date(DateTime.LocalNow())If you can provide some data, it will be helpful 🙂
- Rapaille
Helper I