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
harirao
Post Prodigy
Post Prodigy

Convirtiendo la semana W53 12 2020 a "Dec-2020"

Hola Equipo,

¿Puede por favor ayudarme cómo convertir semanas es decir, W53 12 2020 a "Dic-2020", intentado usando formato de su no funciona, el tipo de datos de la fuente es "TEXTO"

Format.PNG

Gracias

saludos

1 ACCEPTED SOLUTION

@harirao , Puede crear una fecha como

Week to Date = var _st = date(right([Weeks],4),1,1)
var _week = mid([Weeks],2,2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1

A partir de la fecha se puede obtener cualquier formato

Año del mes á format([Week to Date] ,"MMM YYYY")

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@harirao ,

En una nueva columna como

if(SEARCH("W53",[Weeks],,0)>0, "Dec " & right([Weeks],4),[Weeks])

Hola @amitchandak,

Gracias por su respuesta rápida, está trabajando para una fila, es posible utilizar el mes mencionado en la fila Eg "W53 12 2020", puede utilizar sólo 12, 11, 10 para convertir el formato del mes?

Format.PNG

Gracias por tu ayuda

saludos

@harirao , Puede crear una fecha como

Week to Date = var _st = date(right([Weeks],4),1,1)
var _week = mid([Weeks],2,2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1

A partir de la fecha se puede obtener cualquier formato

Año del mes á format([Week to Date] ,"MMM YYYY")

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.