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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply

Generate last date base on a condition

Hi All!

Need help.

I want to get the last date from two tables based on a condition. Here is an example:

 
per Amort 
DUEDATEAmort
11/16/2018              925,000.00
02/16/2019              809,375.00
05/16/2019              693,750.00
08/16/2019              578,125.00

 

per GL 
GL DATEGL
11/21/2018              925,000.00
02/19/2019              809,375.00
05/17/2019              693,750.00
09/20/2019              668,189.53
 
 

 

 

 

 

 

 

So I have two tables namely per Amort and per GL, now I need to get the DueDate and the GL Date where the Amort is more than or equal the GL which is in this case it is 05/16/2019 and 05/17/2019, respectively.

I tried using the dax formula below but it resulted me to 09/20/2019 instead of 05/17/2019:

Last Date of Payment =
VAR diff = [Amort Trans Sum] >= [GL Trans Sum]
VAR calc = CALCULATE(MAX(' per GL'[GL DATE]),FILTER('P3 OB per GL',[Amort Trans Sum] >= [GL Trans Sum]))

VAR duedate = max('per Amort'[DUEDATE])
VAR releasedate = max('Loans'[LOAN RELEASE DATE])
RETURN
If(calc = releasedate,duedate,calc)
 
Thanks!
0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.