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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shalaka1
Regular Visitor

How to convet year week number to date

Hi,

I have year and weenumber and I need to convert this to date 

for example : I have 202237 , here 2022 is date and 37 is weeknumber and I need to convert this to date without dax.

could you please help me to sort out this issue. 

 

Thanks.

2 REPLIES 2
Ahmedx
Super User
Super User

plse try this
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26Rh00C0uCitb4Nd7qQ?e=5s8ai9

[
Y = Number.From(Splitter.SplitTextByLengths({4, 2})( Text.From(
    [#"Year-week"])){0}),
W =Number.From(Splitter.SplitTextByLengths({4, 2})( Text.From([#"Year-week"])){1}),   
 D =  List.Select(
 List.Generate(()=>#date(Y,1,1),(x)=>x<=#date(Y,12,31),(x)=>Date.AddDays(x,1)),(x)=> Date.Year(x) = Y and Date.WeekOfYear(x)=W) 
     ][D]

Screen Capture #946.pngScreen Capture #947.pngScreen Capture #948.png

Idrissshatila
Super User
Super User

Hello @Shalaka1 ,

 

check this solution https://community.powerbi.com/t5/Desktop/convert-week-number-into-data/td-p/88227

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.