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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MarkShoo
New Member

Lookupvalue and/or firstnonblank help to get most recent value

Hi,

 

I'm trying to get the most recent transaction date for a specifc letter name (Recovery Insurer 3 (sending losses)) for each individual incident no.

There are sometimes multiple records of the same letter being sent on different days. The data is sorted by the most recent day coming first.

 

How do I use the lookupvalue and firstnonblank formulas to solve the issue? I've seen other related articles, but can't seem to solve it... 

 

The data sets are:

 

Main table to try and get latest letter date added in:

 

Table 'Weekly Report'

 

MarkShoo_9-1631280770378.png

 

Table that has the multiple letters:

 

Table 'Recovery Letters Test'

 

MarkShoo_10-1631280795236.png

 

So I would want table 1 to return 24/05/2021 for incident no 123456 for the 'Recovery Insurer 3 (sending losses)' letter as that is the latest date that 'Recovery Insurer 3 (sending losses)' letter has been completed. 

 

Thanks

 

 


  

1 ACCEPTED SOLUTION

Hi @MarkShoo,

 

you would just need to include that in your filter, see below

Latest Date = 
var _incident = 'Weekly Report'[Incident No]
return
CALCULATE(max('Recovery Letters Test'[Trans'n Dt]), FILTER('Recovery Letters Test', 'Recovery Letters Test'[Incident No] = _incident && 'Recovery Letters Test'[Description] = "Recovery Insurer3 (sending losses)"))

 Thanks



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


View solution in original post

4 REPLIES 4
richbenmintz
Solution Sage
Solution Sage

Hi @MarkShoo,

 

Please try the following calc column formula

Latest Date = 
var _incident = 'Weekly Report'[Incident No]
return
CALCULATE(max('Recovery Letters Test'[Trans'n Dt]), FILTER('Recovery Letters Test', 'Recovery Letters Test'[Incident No] = _incident))

 

Thanks,



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Thanks. 

 

That gives the latest date of any letter sent, but can you filter it to specific letter names? IE for the 'Recovery Insurer 3 (sending losses)' letter?

 

Hi @MarkShoo,

 

you would just need to include that in your filter, see below

Latest Date = 
var _incident = 'Weekly Report'[Incident No]
return
CALCULATE(max('Recovery Letters Test'[Trans'n Dt]), FILTER('Recovery Letters Test', 'Recovery Letters Test'[Incident No] = _incident && 'Recovery Letters Test'[Description] = "Recovery Insurer3 (sending losses)"))

 Thanks



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


That's worked perfectly - Thanks @richbenmintz much appreciated

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.