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
67nmark
Helper I
Helper I

DAX calculado columna- obtener el valor del registro anterior

Hola, he buscado respuestas, pero no puedo conseguir lo que quiero. Esencialmente necesito una columna que traiga el valor asociado a una fecha anterior a la fila actual. La siguiente imagen muestra el requisito. Me gustaría que la columna Probador mostrara el valor de la fecha anterior para cada persona. El DAX que tengo tiene una fecha codificada que funciona para las fechas más recientes, pero a medida que voy por la columna (obviamente) comienza a fallar. Cualquier ayuda muy apreciada.previous.png

4 REPLIES 4
Greg_Deckler
Super User
Super User

@67nmark Vea mi artículo sobre el tiempo medio entre fallas (MTBF) que utiliza ANTES: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
FarhanAhmed
Community Champion
Community Champion

Prueba esto

Last Val = CALCULATE(LASTNONBLANK('Table'[Value],'Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Name]),'Table'[Date]<EARLIER('Table'[Date])))






Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Perfecto. Muchas gracias 🙂

amitchandak
Super User
Super User

@67nmark , Como medida con tabla de fechas

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

como una columna

Valor del último día ?
var _max á maxx(filter(Table, [date] < earlier([date]) && [name] á earlier([name])),[date])
devolución
maxx(filter(Table, [date] á _max && [name] á earlier([name])),[value])

lo mismo se discute en

https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5c3243d...

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.