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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rachaelwalker
Resolver III
Resolver III

Pulling most recent date from related table based on condition

I am looking for help creating a dax formula based on the tables below. I want to create a column/measure in the Inventory List table to pull the most recent purchase and received date for each item_id, and for the corresponding warehouse and warehouse bin ID. The tables are related using item_id. 

 

I attempted to create a column to pull the max purchased date but it is returning the same date for all warehouses. 

rachaelwalker_0-1631029959741.png

 

1 ACCEPTED SOLUTION

I figured it out by using the group by feature in power query then used the Max/Min on the dates in the visual. Sorry, I should have provided more sample data. 

View solution in original post

6 REPLIES 6
VahidDM
Super User
Super User

Hi @rachaelwalker 

 

Could you please add more details to your request? or share sample of your tables here [after removing sensitive data]

How to Get Your Question Answered Quickly

 

โœŒ๏ธ

@VahidDM Please see above for sample data 

rachaelwalker
Resolver III
Resolver III

Here is some sample data for one inventory item. I am looking for the most recent purchase date for each item in each warehouse and warehouse bin. For this data set, it should only return a date for the Oregon warehouse/bin O-4

rachaelwalker_0-1631195243835.png

 

rachaelwalker_2-1631195537369.png

 

 

 

Can you copy and paste that data from Excel into your post please?

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Inventory List

IV_Item_RecIDWarehouse_NameBin_NameQty_On_Hand
31143Oak Creek WarehouseBusey Stock0
31143Oak Creek WarehouseJ-30
31143Oak Creek WarehouseK-20
31143Oak Creek WarehouseK-30
31143Oak Creek WarehouseWarehouse0
31143Oregon WarehouseO-427

 

Purchase Details

item_idDate_PurchasedWarehouse_NameBin_Nameiv_item_recid
RLNK-215R6/24/2021Oregon WarehouseO-431143
RLNK-215R1/27/2021Oregon WarehouseO-431143
RLNK-215R1/27/2021Oregon WarehouseO-431143
RLNK-215R12/14/2020Oregon WarehouseO-431143
RLNK-215R12/28/2020Oregon WarehouseO-431143
RLNK-215R10/13/2020Oregon WarehouseO-431143
RLNK-215R10/12/2020Oregon WarehouseO-431143
RLNK-215R10/7/2020Oregon WarehouseO-431143
RLNK-215R9/18/2020Oregon WarehouseO-431143
RLNK-215R9/18/2020Oregon WarehouseO-431143
RLNK-215R9/18/2020Oregon WarehouseO-431143
RLNK-215R6/30/2020Oregon WarehouseO-431143
RLNK-215R3/10/2020Oregon WarehouseO-431143
RLNK-215R3/10/2020Oregon WarehouseO-431143

I figured it out by using the group by feature in power query then used the Max/Min on the dates in the visual. Sorry, I should have provided more sample data. 

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (27)