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
modeco
Frequent Visitor

Finding related value from different table based on date

 

Hi, DAX gurus! 🙂

We have a challange on calculating profit or loss statement for a specific vending devices in a specific location, taking into account that devices are being moved from time to time between serveral locations.

We have two tables – one which contains our expense transactions for a specific devices (date | device id| cost sum) and other table contains device movement history between locations (movement date | device id | new location id).

What we need is to create a column in expense table that would represent the corresponging location value of the device from most recent movement entry (date of latest movement entry equals or is before expense transaction date). In other words – i need to identify where the device was located on the expense transaction date.

 

Any ideas/suggestions how to solve this?

 

P.S. We also do have a calendar table in our datamodel (linked by date column to both above mentioned tables) and device table that contains unic values of device id's linked by device ID to both previously mentioned tables.

1 REPLY 1
technolog
Super User
Super User

Can you please tell me if the problem is still relevant? If you managed to solve it in some way, please write here how you solved this problem. Then it will be possible to mark this problem as solved.

If not, it may make sense to ask the question again, thus confirming the relevance of this problem.

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.