How to get one value from Lookupvalue when table has duplicate

Hello all: I have the following Dax code the retrieves the color name from the LookupTable where the color code and unit are equal between the lookup table and the sales table:

ColorName =
LOOKUPVALUE (
‘LookupTable’[ColorName],
‘LookupTable’[ColorCode], ‘Sales’[ColorCode],
‘LookupTable’[Unit], ‘Sales’[Unit]
)

The Lookup table have duplicate values due to other columns in the table. I tried to create a distinct table using the Lookuptable with ColorName, ColorCode, and Unit, however the resulting table stored in a variable “cannot be used in the current context because a base table is expected”

Can someone please help me DAX expression that would fix this?

Many thanks in advance!