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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
vincenardo
Helper I
Helper I

Create measure to return later of dates from two seperate linked table

I have 3 tables joined by an ID Field.

In table 1 I have the ID field and it is joined to table 2 that has the Original Date for each ID and joined to table 3 that has the Revised Date for each ID.


I want to create a measure that looks at the date for the ID in Table 2 and the date for the ID in Table 3 and return the later of the two dates into a new measure called 'Latest Date'.

 

An assistance is welcomed!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a measure.

 

Jihwan_Kim_0-1707673311728.png

Jihwan_Kim_1-1707673508606.png

 

RELATEDTABLE function (DAX) - DAX | Microsoft Learn

 

Expected result measure: =
VAR _origin =
    MAXX ( RELATEDTABLE ( 'Original Date' ), 'Original Date'[Original Date] )
VAR _revised =
    MAXX ( RELATEDTABLE ( 'Revised Date' ), 'Revised Date'[Revised Date] )
RETURN
    IF ( HASONEVALUE ( 'Name'[Name] ), MAX ( _origin, _revised ) )

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @vincenardo ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a measure.

 

Jihwan_Kim_0-1707673311728.png

Jihwan_Kim_1-1707673508606.png

 

RELATEDTABLE function (DAX) - DAX | Microsoft Learn

 

Expected result measure: =
VAR _origin =
    MAXX ( RELATEDTABLE ( 'Original Date' ), 'Original Date'[Original Date] )
VAR _revised =
    MAXX ( RELATEDTABLE ( 'Revised Date' ), 'Revised Date'[Revised Date] )
RETURN
    IF ( HASONEVALUE ( 'Name'[Name] ), MAX ( _origin, _revised ) )

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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 Solution Authors