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
cheresier
Frequent Visitor

Filtrar una tabla CALENDAR para incluir solo las fechas del primero del mes

Considere una tabla definida con el siguiente DAX:

FirstOfTheMonth á FILTER(CALENDAR(DATE(2000, 1, 1), DATE(2030, 12, 31)), DAY([Date] ? 1))
Efectivamente, estoy tratando de tener una tabla que contenga todas las fechas del primero del mes en un intervalo determinado. Sin embargo, parece que el filtrado por DAY([Date])-1 no está teniendo ningún efecto:

2020-09-30 14_21_26-Heatmap_v1.0_1 - Power BI Desktop.png

Curiosamente, el filtrado por MES funciona. Por lo tanto, definir la tabla como FILTER(CALENDAR(DATE(2000, 1, 1), DATE(2030, 12, 31)), MONTH([Date] ? 3)) daría como resultado una tabla que solo contiene fechas de marzo en todos los años entre 2000 y 2030 (según lo previsto).

¿De qué se trata el filtrado por DAY([Date])-1 que no funciona?

¡Gracias!

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@cheresier

Ha añadido el último soporte dentro de DAY

Prueba esto

FirstOfTheMonth á FILTER(CALENDAR(DATE(2000, 1, 1), DATE(2001, 12, 31)), DAY([Date]) ? 1)

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@cheresier

Ha añadido el último soporte dentro de DAY

Prueba esto

FirstOfTheMonth á FILTER(CALENDAR(DATE(2000, 1, 1), DATE(2001, 12, 31)), DAY([Date]) ? 1)

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Bueno, eso fue vergonzoso. Gracias.

Ahora me gustaría que hubiera una manera de eliminar este post ya que claramente no añade ningún valor a la comunidad y no sirve para otro propósito que como un registro de mi estupidez 🙂

MEEnergy
Frequent Visitor

Puede utilizar la función Startofmonth para obtener la primera fecha de cada mes. Tratar

FirstOfMonth = STARTOFMONTH(DateTable[Date].[ Fecha])

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.