cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors