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
ptkhoa2110
Helper II
Helper II

LEAD - LAG en medida DAX

Queridos todos,

Me gustaría hacer una pregunta, cómo usar Lead LAG en la medida DAX en PowerBI como SQL Server

Fuentes:

DESDE LA FECHA
3/31/2019
4/1/2019
4/2/2019
4/23/2019

Deseo de destino

DESDE LA FECHAHasta la fecha
3/31/2019Null
4/1/20193/31/2019
4/2/20194/1/2019
4/23/20194/2/2019
Null4/23/2019

Muchas gracias.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ptkhoa2110 , No hay plomo , retraso en power BI, Puede obtener la salida de esa manera

Pero la última fila es difícil de conseguir

ejemplo de medida

Last Day Non Continuous ? CALCULATE(Max(Table[date]),filter(ALLSELECTED('Date'),'Date'[Date] ?MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))

con la tabla de fechas unida con la fecha que tiene

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ptkhoa2110 , No hay plomo , retraso en power BI, Puede obtener la salida de esa manera

Pero la última fila es difícil de conseguir

ejemplo de medida

Last Day Non Continuous ? CALCULATE(Max(Table[date]),filter(ALLSELECTED('Date'),'Date'[Date] ?MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))

con la tabla de fechas unida con la fecha que tiene

Que correcto para mí, quiero calcular entre 2 fechas en 2 filas.

Sí, muchas 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.