Forum Discussion
LookupValue matching multiple columns error
- 3 years ago
Here are two solutions. A relationship between the tables is not required.
1. Calculated column in table Returned_items:
Price = LOOKUPVALUE ( Sales_items[price], Sales_items[order_id], Returned_items[order_id], Sales_items[sku], Returned_items[sku] )2. Calculated column in table Returned_items using a composite key. The composite key "order_id-sku" can be created in Power Query or DAX.
Price (composite key) = LOOKUPVALUE ( Sales_items[price], Sales_items[order_id-sku], Returned_items[order_id-sku] )
Here are two solutions. A relationship between the tables is not required.
1. Calculated column in table Returned_items:
Price =
LOOKUPVALUE ( Sales_items[price], Sales_items[order_id], Returned_items[order_id], Sales_items[sku], Returned_items[sku] )
2. Calculated column in table Returned_items using a composite key. The composite key "order_id-sku" can be created in Power Query or DAX.
Price (composite key) =
LOOKUPVALUE ( Sales_items[price], Sales_items[order_id-sku], Returned_items[order_id-sku] )
- DataScope063 years agoHelper I
DataInsights Your solution using LOOKUPVALUE ended up working. Which was the same function I had been trying to use. In my original post I had a typo that I went back and edited. The typo was just in this post though, not my workbook.
My real issue was my dataset did in fact have duplicate records. I was unaware that was possible in the database I pulled the data from. Hence the error stating, "A table of multiple values was supplied where a single value was expected."
Anyone who finds this question should verify their datasets do not have duplicate records if they see the table with multiple values error.