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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
pkruarat
Regular Visitor

LOOKUPVALUE gives 'A table of multiple values was supplied where a single value was expected.'

Hello,

 

Currently, my data table has 'main' contracts (e.g. 328487) and also 'supplement' contracts (e.g. 328488), which can have many rows and are linked together in Column LinkRef1. I would like to create a new column to lookup MaturityDate of the supplement contracts to check if it is the same as the main contract:

 

MDCheck = IF(Table[MaturityDate]=LOOKUPVALUE(Table[MaturityDate], Table[ContNo], Table[LinkRef1]), "Yes", "No")

 

This seems to give an error message 'A table of multiple values was supplied where a single value was expected'.

 

Ultimately, I would like to create this check for ValueDate, MaturityDate, and PrincipalFace. What would be the best solution for this?

 

Any help would be highly appreciated. Thank you!

 

Sample data:

ContNoLegNumberLegTypeLinkRef1TradeDateValueDateMaturityDateOriginal_CurrPrincipalFace
3284880Pay328487Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR10000000
3284880Receive328487Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR-10000000
3284870Invest328488Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR-10000000
1 ACCEPTED SOLUTION

@pkruarat 

maybe you can try this

Column = if(ISBLANK(maxx(FILTER('Table','Table'[ContNo]=EARLIER('Table'[LinkRef1])),'Table'[ContNo])),"No","Yes")

11.PNG





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

Proud to be a Super User!




View solution in original post

7 REPLIES 7
azakir
Resolver I
Resolver I

Hi @pkruarat 

Seems like you're trying to lookup a value from a column that has multiple values (ideally there should be one). 

 

See if this formula helps you in any way: 

 

Example =

CALCULATE (

    FIRSTNONBLANK (Table[MaturityDate], 1 ),

    FILTER ( ALL (Table), Table[ContNo] = Table2[LinkRef1])

)

Hello @azakir ,

 

Thank you for your suggestion! But, this seems to return just the lowest value/earliest date in the MaturityDate column for all rows.

 

pkruarat_0-1693469345055.png

 

ryan_mayu
Super User
Super User

what's the expected output based on the sample data you provided?





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

Proud to be a Super User!




Hello @ryan_mayu ,

 

The expected output is Yes for all 3 lines, please, because MaturityDate of 328488 and 328487 are the same.

 

I understand that the problem is that there are 2 lines for 328488. Is there a way to check against the first available matched value? They are matched through Column LinkRef1.

 

ContNoLegNumberLegTypeLinkRef1TradeDateValueDateMaturityDateOriginal_CurrPrincipalFaceMDCheck
3284880Pay328487Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR10000000Yes
3284880Receive328487Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR-10000000Yes
3284870Invest328488Tue, 29/Aug/23Thu, 31/Aug/23Thu, 28/Nov/24EUR-10000000Yes

@pkruarat 

maybe you can try this

Column = if(ISBLANK(maxx(FILTER('Table','Table'[ContNo]=EARLIER('Table'[LinkRef1])),'Table'[ContNo])),"No","Yes")

11.PNG





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

Proud to be a Super User!




This solved my problem! Thank you so much!

 

I'll use this to check other values as well 😃

you are welcome





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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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