Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PWillsNorgine
Frequent Visitor

How do I convert year and week number to a date in M language?

Hi,

 

I have a year column and a week number column in my raw data (the values were provided by week) and in a seperate Power BI model I used DAX to create a date using Sunday as the last day of the week:

DATE([Year],1,1)-WEEKDAY(DATE([Year],1,1),2)+[Week No]*7
 
I need to now change the column from DAX to Power Query M language in order to append with other raw data queries that already have date columns.
 
Does anyone know what the M script is to do this?
 
Thanks
 
1 ACCEPTED SOLUTION
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

You could try the solution provided here

Re: convert week number into data

View solution in original post

1 REPLY 1
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

You could try the solution provided here

Re: convert week number into data

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.