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 MAX para cada id repetitivo

eh

Mi tabla sigue esta estructura:

identificaciónfechaestado
1 14/02/2021 error
1 19/06/2020 De acuerdo
2 30/05/2021 De acuerdo
3 16/01/2021 De acuerdo
3 22/04/2021 error
4 29/12/2020 De acuerdo

Como puede ver, cada id puede tener más de una fila, pero siempre con fechas diferentes.
Quiero crear una tabla calculada solo con las filas donde el año es igual al año actual y obtener solo la FECHA MÁXIMA de cada id. Por lo tanto, la tabla calculada en la tabla anterior debe ser:

identificaciónfechaestado
1 14/02/2021 error
2 30/05/2021 De acuerdo
3 22/04/2021 De acuerdo

¿Cómo puedo hacer esto?

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@req7

Cree una tabla de la siguiente manera:

FILTER(
	Table1,
	year(Table1[Date]) = year(TODAY()) &&
	CALCULATE(	
		max(Table1[Date]),
		ALLEXCEPT(table1,Table1[id])
	) = Table1[Date]
	
)

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@req7

Cree una tabla de la siguiente manera:

FILTER(
	Table1,
	year(Table1[Date]) = year(TODAY()) &&
	CALCULATE(	
		max(Table1[Date]),
		ALLEXCEPT(table1,Table1[id])
	) = Table1[Date]
	
)

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.