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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
arhomberg
Helper I
Helper I

Create a New Column That References Previous Record in Another Table

Hello Everyone!

 

I am looking to find a way to create a new column in a table that looks for a record in another table with the associated id, and pulls a column from it.

 

arhomberg_0-1626725162064.png

 

 

Above is a picture of the current data layout. I would like to create the 'New Create Date' in my Table2 that references the previous 'systemmodstamp' in Table1 for the matching 'id', which would be "7/8/2021 19:08". You'll notice that it has to be the most recent 'systemmodstamp' for that specific record. The pattern is that the next most recent entry in the system is suppsoed to have a 'createddate' of the previous records 'systemmodstamp'.  If there is no version of the Table2 'id' in Table1, it should do nothing.

 

Any advice on how to approach this would be greatly appreciated.

 

Thanks!

3 REPLIES 3
Anonymous
Not applicable

Remember that in Power Query you can use JOINS like in SQL (the option: Merge Queries) and filtering. On top of that you've got the full power of the M language at your fingertips...

Anonymous
Not applicable

Are you doing this in Power Query? Because this is the place where you should do it.

@Anonymous I was not sure where the best place for this would be done. My initial thought was a dax expression, but I could move this to the power query page if this is where things should be aimed! Thanks!

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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