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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
InsightSeeker
Helper I
Helper I

A table of multiple values was supplied where a single value was expected

I have multiple code in my data (Table 1) and I want to retrieve the first (Name) from Table 1 and place it in my Table 2.

 

When I use lookcolumnvalue I get an error message “A table of multiple values was supplied where a single value was expected”. How can I handle this?

 

COLUMN =  LOOKUPVALUE(TABLE 2 [NAME],TABLE 1[CODE] ,TABLE [2 CODE])

 

TABLE 1

CodeName
1Apple
1Apple
1Apple
1Apple
2Banana
2Banana
2Banana
3Grapes
4Berry
5Carrot
6Mango
7Curd
7Curd
7Curd

 

TABLE 2

 

CodeName
1 
1 
1 
1 
2 
2 
2 
3 
4 
5 
6 
7 
7 
7 
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@InsightSeeker Try using MAXX( FILTER( ... ), ... ) instead


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Tahreem24
Super User
Super User

@InsightSeeker Create a NameColumn like this:

NameColumn = LOOKUPVALUE(Table1[Name],Table1[Code],Table2[Code])
Tahreem24_0-1714405612345.png

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Greg_Deckler
Super User
Super User

@InsightSeeker Try using MAXX( FILTER( ... ), ... ) instead


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.