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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
MiguelSaldana77
Resolver I
Resolver I

el último día febrero en el año bisiesto.

Hola a todos, tengo un problema CalcularFebreroúltimo día en el año bisiesto.
Supongoestamos el 15 de febrero de 2017 y necesito calcularel último díade la misma fecha hace un año (29 de febrero de 2016) (Es un año bisiesto).
¿Alguna idea?

1 ACCEPTED SOLUTION
MiguelSaldana77
Resolver I
Resolver I

Finalmente hice esta manera

image.jpg

View solution in original post

5 REPLIES 5
MiguelSaldana77
Resolver I
Resolver I

Finalmente hice esta manera

image.jpg

amitchandak
Super User
Super User

@MiguelSaldana77 ,

Si es una fecha continua

the dateadd(Table[Date],-1,year)

O

La misma fecha del año pasado: fecha(año(tabla[fecha])-1,mes(Tabla[Fecha]),día(Tabla[Fecha]))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
az38
Community Champion
Community Champion

@MiguelSaldana77

si necesita el último día del mismo mes, pero en un año anterior intente

Column = ENDOFMONTH( DATE(YEAR([Date]) - 1, MONTH([Date]), DAY([Date])) )


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

El problema se debe a que el panel tiene 2 filtros (Año y Mes) y para obtener la fecha estoy usando MAX(Time(Date)) y"ENDOFMONTH"no acepta Max como parte de la fórmula.
Error

ENDOFMONTH( DATE( VALUE(YEAR(MAX('Cat Tiempo'[Fecha])))- 1, MONTH(Max('Cat Tiempo'[Fecha])), DAY(Max('Cat Tiempo'[Fecha]))) )

@MiguelSaldana77 - EOMONTH(MAX('Cat Tiempo'[Fecha]),-12) Para el año pasado febrero. Para este año Feb, EOMONTH(MAX('Cat Tiempo'[Fecha]),0) suponiendo que su fecha máxima sea una fecha en febrero.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors