Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AOD
Helper III
Helper III

New table creation /transformation

Hi All, 

 

I have a audit table which stores changes done at field level, would like to transform into new table to store the latest changes with old and new value as below.

Need help on how can this be achieved. Also please advice if any other method to achieve this instead of creating new table.

Thanks in advance. 

 

Existing Audit table 

EmployeeField 1Modified date 
EP123Yes22-Jun-20
EP123No23-Jun-20
EP123Yes24-Jun-20
EP124Yes22-Jun-20
EP124No23-Jun-20
EP125Yes21-Jun-20
EP125No 22-Jun-20
EP125Yes23-Jun-20
EP125No24-Jun-20

 

New table to be created - 

EmployeeNew ValueOld ValueLast modified date
EP123YesNo24-Jun-20
EP124NoYes23-Jun-20
EP125NoYes24-Jun-20

Thanks. 

Regard,

AOD

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AOD , Try both as new columns

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

 

Share with Power BI Enthusiasts: 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 , Try both as new columns

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

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks Amit for solution.

 
 

I have below output now. Is there as way that I can just keep last work of every employee in the table

 

Capture.JPG

Thanks for your help.

AOD

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors