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
AOD
Helper III
Helper III

Creación/transformación de nuevas tablas

Hola a todos

Tengo una tabla de auditoría que almacena los cambios realizados a nivel de campo, me gustaría transformarse en una nueva tabla para almacenar los últimos cambios con el valor antiguo y nuevo como se muestra a continuación.

Necesita ayuda sobre cómo se puede lograr esto.

Tabla de auditoría existente

EmpleadoCampo 1Fecha de modificación
EP12322-Jun-20
EP123No23-Jun-20
EP12324-Jun-20
EP12422-Jun-20
EP124No23-Jun-20
EP12521-Jun-20
EP125No 22-Jun-20
EP12523-Jun-20
EP125No24-Jun-20

Nueva tabla que se creará -

EmpleadoNuevo valorValor antiguoFecha de última modificación
EP123No24-Jun-20
EP124No23-Jun-20
EP125No24-Jun-20

Gracias.

Respecto

AOD

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AOD , Pruebe ambos como nuevas columnas

 last date = maxx(filter(Table, [Employee] =earlier([Employee]) && [Modified date] <earlier([Modified date])),[Modified date])
 last status = maxx(filter(Table, [Employee] =earlier([Employee]) && [Modified date] =earlier([last date])),[Field 1])

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AOD , Pruebe ambos como nuevas columnas

 last date = maxx(filter(Table, [Employee] =earlier([Employee]) && [Modified date] <earlier([Modified date])),[Modified date])
 last status = maxx(filter(Table, [Employee] =earlier([Employee]) && [Modified date] =earlier([last date])),[Field 1])

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

Gracias Amit por la solución.

Tengo por debajo de la salida ahora. ¿Hay alguna manera de que pueda mantener el último trabajo de cada empleado en la tabla

Capture.JPG

Gracias por tu ayuda.

AOD

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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Top Solution Authors