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
qbarnes
Helper I
Helper I

Find "last" text value within another table, based on Most Recent Date

Hello Everyone, 

 

I'm in need of assistance, as I have two tables that I'm working with...   My Entire_Portfolio_Table has all loans in our portfolio, and my Modification_Table only contains loans that have ever been modified. 

 

The Modification Table, does consist of multiple Modification Types, for various reasons, throughout the lifecycle of each loan.   I need to pull in the most recent ModType by Date (from the Modification_Table), into my Entire_Portfolio_Table.

 

Modification_Table

LeadidModTypeModDate
0002PmtHoliday2/1/2020
0002SubsequentMod3/15/2020
0002PermanentMod5/14/2020
0003CovidMOD4/1/2020
0005PmtHoliday1/20/2020
0005CovidMOd4/1/2020
0005PermanentMod6/1/2020

 

 

Entire_Portfolio_Table:

LeadidDateFundedModTypeModDate

0001

1/2/2017nullnull
00021/2/2017PermanentMod5/14/2020
00032/12/2017CovidMOD4/1/2020
00042/14/2017nullnull
00053/1/2017PermanentMod6/1/2020

 

The result i need would be whats shown in the Portfolio Table, above.

 

Note: My initial DAX formulas found the most recent ModType, but it eliminated the loans that didn't have a mod, but I need a snapshot of all loans:   

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @qbarnes ,

 

Create two column as below.

Column = CALCULATE(MAX('Table'[ModDate]),FILTER('Table','Table'[Leadid]='Table (2)'[Leadid]))

Column 2 = CALCULATE(MAX('Table'[ModType]),FILTER('Table','Table'[ModDate]='Table (2)'[Column]))

Result would be shown as below.

2.PNG 

 

Best Regards,

Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @qbarnes ,

 

Create two column as below.

Column = CALCULATE(MAX('Table'[ModDate]),FILTER('Table','Table'[Leadid]='Table (2)'[Leadid]))

Column 2 = CALCULATE(MAX('Table'[ModType]),FILTER('Table','Table'[ModDate]='Table (2)'[Column]))

Result would be shown as below.

2.PNG 

 

Best Regards,

Jay

Awesome!!  Thank you so much!!

Greg_Deckler
Community Champion
Community Champion

@qbarnes - Sounds like you want Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

 

Thanks for the assist.   I'm not calculating any numeric values, so how would I transform this portion of the formula, and the references to: 

 

 "__Value",SUM('Table'[Value])

 

I basically need to pull in all loans where MODType and ModDate are applicable, for the entire portfolio.   If a loan never had a Modfication i need to maintain that as a blank value as well, to have a full snapshot of what does and does not have a ModType.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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