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
Anonymous
Not applicable

Having trouble with Lookup

In trying to use the Lookup funtion, I believe I am doing something incorrectly.  

 

My expected outcome is that from within my Orders table, I want to "lookup" the ship date from my Shipments table, and then create a column for "ship date" on my Orders table.  (no direct relation ship but both are connected to a date table.    

 

Right now, a column is being created  (ship date month), but it seems to be grabbing the "due date" from my Orders table.  

 

If the ship date for a particular order is in the future and has not happened yet, I would like the ship date column to return a ZERO. 

 

(I beleive the same thing is happning with my formula for est close month).    The Order Date and Due Date columns already exist on my orders table.  

 

How can I bring in, and put in a column, the "est close dates" from my Shipments table?  

 

Ship Date Month =
LOOKUPVALUE ( 'Flu_Shipped Orders'[Date Shipped Month], 'Flu_Shipped Orders'[Date Shipped Month], Sales_Orders_for_Charts[Due Date Month])
 
if then .png
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

I think you should move the date based on order no or something like that. Another way to get a column from one table 2 to table 1

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])

 

Refer to the order dimension in this file. it has an example

https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

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

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous ,

I think you should move the date based on order no or something like that. Another way to get a column from one table 2 to table 1

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])

 

Refer to the order dimension in this file. it has an example

https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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