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
Syndicate_Admin
Administrator
Administrator

Fecha de semana y año

hola

Actualmente estoy trabajando con una mesa, que proporciona año y semana, pero me gustaría tener una cita (DD/MM/AAAA). Como lo necesito para hacer alguna relación.

alexcatala_0-1620918430457.png

¿Alguna sugerencia sobre cómo calcular la fecha a partir del año y la semana num?

Gracias por su tiempo

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@alexcatala, Puede obtener la fecha de inicio de la semana como

Semana a fecha = var _st = fecha([año],1,1)
var _week = [Semana]
Devolver _st+((_week-1)*7) -DÍA DE LA SEMANA(_st,2)+1

El formato de la fecha se puede establecer en formato o se establece en el nivel del sistema

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/...

Fecha como texto = formato([Semana a fecha],"dd/mm/aaaa")

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@alexcatala, Puede obtener la fecha de inicio de la semana como

Semana a fecha = var _st = fecha([año],1,1)
var _week = [Semana]
Devolver _st+((_week-1)*7) -DÍA DE LA SEMANA(_st,2)+1

El formato de la fecha se puede establecer en formato o se establece en el nivel del sistema

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/...

Fecha como texto = formato([Semana a fecha],"dd/mm/aaaa")

@amitchandak ¡Eso funciona! gracias

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.