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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
UmairKamal
Helper I
Helper I

Lookupvalue bringing invalid dates

Dear Users,

 

I have a table of payments and a table of cases. although there exists a one to many relationship, RELATED does not seem to be working.

 

There are multiple payments for the same case with different payment dates.

 

what I am trying to achieve is to to extract the first payment date for any case. for this I used the following formula:

 

Payment Date = LOOKUPVALUE(Paid[Payment Date],Paid[Case-WE Month],Case[Case-WE Month], min(Paid[Payment Date]))

 

I am receiving the following results. as you can see that it is giving me dates which precede the date of the data itself i.e. the dataset starts from October 2022, whilst I am getting the invalid date of 2 October 2020. as a result, I am getting negative payment days as well. 

 

what can I do to fix the issue? 

 

UmairKamal_0-1679573862466.png

 

5 REPLIES 5
HotChilli
Super User
Super User

This is a calculated column? or a measure?

Please provide sample data and show the desired result 

I have cracked the code, thank you for your interest and responses. 

This is a caluclated column and not a measure, please see the example with dummy data below, the desired result is in RED.

 

UmairKamal_0-1679578568312.png

 

HotChilli
Super User
Super User

This is a calculated column?

LOOKUPVALUE needs an odd number of parameters (there are 4 in the provided code).

It should be 

(return value, search column1, search value1, search column2, search value2........ 

the last expression in the code is for alternate result, that is why it is even number of parameters. considering the issue explained, you could advise me a better solution if the one I used is not.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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