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

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])

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])

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
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.