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

Convert iso (wwyyyy) to date?

My report brings in the date format as ww.yyyy (e.g. 50.2019, 06.2020)

 

How can I convert this to a date format? (e.g. 09-12-2019, 05-02-2020)

 

 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @dapperscavenger ,

Please create a calculated column as shown below to work on it.

Column = 
VAR year =
    RIGHT ( 'Table'[wwyyyy], 4 )
VAR weeknum =
    VALUE ( LEFT ( 'Table'[wwyyyy], 2 ) )
VAR datetable =
    CALENDAR ( DATE ( year, 1, 1 ), DATE ( year, 12, 31 ) )
RETURN
    MINX ( FILTER ( datetable, WEEKNUM ( [Date], 2 ) = weeknum ), [Date] )

Capture.PNG

Pbix as an attachment.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @dapperscavenger ,

Please create a calculated column as shown below to work on it.

Column = 
VAR year =
    RIGHT ( 'Table'[wwyyyy], 4 )
VAR weeknum =
    VALUE ( LEFT ( 'Table'[wwyyyy], 2 ) )
VAR datetable =
    CALENDAR ( DATE ( year, 1, 1 ), DATE ( year, 12, 31 ) )
RETURN
    MINX ( FILTER ( datetable, WEEKNUM ( [Date], 2 ) = weeknum ), [Date] )

Capture.PNG

Pbix as an attachment.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thank you.  That worked nicely!

 

amitchandak
Super User
Super User

Assuming this is a single value

new column
var _minYear =date(year(mid([column],3,4))1,1)
var _maxYear =date(year(right([column],4))1,1)
return
Week = ((_minYear +(-1*weekday(_minYear)+1)) +7*left([column],2)) & "," & ((_maxYear +(-1*weekday(_maxYear)+1)) +7*mid([column],10,2))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

Split your Date column in Power Query. You can use the DAX below:

Column = 
    VAR __Calendar = 
        ADDCOLUMNS(
            CALENDAR(DATE([Date.2],1,1),DATE([Date.2],12,31)),
            "Week",
            WEEKNUM([Date])
        )
RETURN
    MINX(FILTER(__Calendar,[Week] = [Date.1]),[Date])

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors