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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors