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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors