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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Lookupvalue function returns error

Hello

 

I'm trying to lookup value (list prise) in one input table:

inDiana_0-1622462056218.png

and merge it with the following table

inDiana_3-1622462175113.png

to get the following resul table (list price is the same ragardless the date)

inDiana_2-1622462145944.png

However, Lookupvalue formula returns an error "A table with multiple values was returned when a single value was expected". 

 

Any idea what causes the error and how to solve it?

 

Thank you!

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Check your 1st table for duplicate values  in product column. you try the following as well:

ListPrice = 
MAXX(
    FILTER(
        table-1,
        table-1[product]=EARLIER(table-2[product])
    ),
    table-1[List Price]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
ERD
Community Champion
Community Champion

Hi @Anonymous ,

What formula did you use?

Here is an example for a measure:

#lookupLP = 
LOOKUPVALUE(InputTable[LP], InputTable[Product], MAX(FollowingTable[Product]))

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Fowmy
Super User
Super User

@Anonymous 

Check your 1st table for duplicate values  in product column. you try the following as well:

ListPrice = 
MAXX(
    FILTER(
        table-1,
        table-1[product]=EARLIER(table-2[product])
    ),
    table-1[List Price]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

selimovd
Super User
Super User

Hey @Anonymous ,

 

did you create it as a calculated column?

Try the following calculated column:

List Price = LOOKUPVALUE( 'Product'[List price], 'Product'[Product], Retail[Product] )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

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!

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