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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
heathernicole
Continued Contributor
Continued Contributor

Comparing dates from two different tables in a related table

I have three tables:

1. - Expected Date

2. Ship Date

3. Order Table

 

 

 

The order table has relationships with the Expected Date Calendar table and the Ship Date Table. I've put the columns I need in a matrix.

 

Capture.PNG

 

I am wanting to compare the Due Date (in WVL) column to the Ship Date column. If the Due Date column is > than the Ship Date Column, Not ok, OK.

 

It SEEMS like it would be a simple IF function - but it won't reference the columns properly. I've tried using the RELATED function - says it needs to be a fully qualified column. Any ideas of how to make this work properly?

 

Thanks in advance! 

 

NOTE: the relationship between the orders table and the two different dates table - is based off a date id for each table. the orders table has a shipdateid column and a expecteddateid column. Many to one, I believe. 

~heathernicoale
1 ACCEPTED SOLUTION

May seem trivial but you are in fact making a calculated column and not a measure?

View solution in original post

4 REPLIES 4
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

What DAX formula did you use for your custom column?  Did you use the TableName[ColumnName] syntax?

@dkay84_PowerBI - Hey! 🙂 I did - 

 

I did a basic IF formula to start IF('Expected Date'[Due Date (in WVL)] > 'Ship Date'[Ship Date], "Not ok", "ok")

~heathernicoale

May seem trivial but you are in fact making a calculated column and not a measure?

Perfect!! 🙂 I thought I had tried the column but apparently, I had tested the measure and not created a calculated column. That did it!

 

Thanks so much! 

 

Not OK - OK.JPG

 

THANK YOU!!!!

~heathernicoale

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Kudoed Authors