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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply

¿Convertir iso (wwyyyy) a la fecha?

Mi informe incluye el formato de fecha ww.yyyy (por ejemplo, 50.2019, 06.2020)

¿Cómo puedo convertir esto a un formato de fecha? (por ejemplo, 09-12-2019, 05-02-2020)

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

Hola @dapperscavenger ,

Por favor, cree una columna calculada como se muestra a continuación para trabajar en ella.

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 como adjunto.

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

Hola @dapperscavenger ,

Por favor, cree una columna calculada como se muestra a continuación para trabajar en ella.

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 como adjunto.

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

Gracias. ¡Eso funcionó muy bien!

amitchandak
Super User
Super User

Suponiendo que se trata de un valor único

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

Divida la columna Fecha en Power Query. Puede utilizar el DAX a continuación:

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors