I need help with Power Query in Power BI. I was given a dataset where only year and week number is mentioned. I need to create a calendar table with: year, week number. For example, I have 2022, 2023 years and for each year there would be 52 weeks entries. I tried M language, but didn't find any solution. Can't create calendar table on the basis of my dataset, because there are not each week mentioned. Can you please suggest me a solution.
A very quick answer would be : use calendarauto()
1/ Go to Table view in power bi (not in power query)
Calendar = CalendarAuto()
2/ in this new table,
week_num = WEEKNUM(Calendar[Date])
3/ Link this table in the model view (between your fact table and this new table, using the date column).
That's it.
If you prefer do it in power query, the previous answer are correct