Forum Discussion

rit_ty7's avatar
rit_ty7
Advocate I
1 year ago

Lookup between two tables not returning expected values

Hello Everyone,
I'm trying to bring values from Daily grn table to placement scm table using lookup but I'm getting this error:
"A table of multiple values was supplied where a single value was expected", the relationship between two tables is of one-to-many with placement scm table on one side and both side filter.
I've built the 1st screenshot column in daily grn table

and using lookup to import into placement scm table as shown:

2 Replies

  • HI rit_ty7 ,

    The Problem is that you are not using LOOKUPVALUE() in the way it should be.

     

    The Base syntax of a Lookupvalue() function is as shown below

    LOOKUPVALUE (
    <result_columnName>,
    <search_columnName>,
    <search_value>
    [, <search2_columnName>, <search2_value>]…
    [, <alternateResult>]
    )

     

    The Third Parameter is a single value that should be passed. But in your case, you are passing a column for the third argument. This means you are passing multiple values where a single constant value is expected.

     

    Instead of using a lookup, I would suggest you consider joins to attain the same functionality

     

    Regards,

     

  • rit_ty7 

    you can try this

    column=maxx(filter('Daily GRN','Placement SCM'[Plant]='Daily GRN'[Plant]),'Daily GRN'[GRN_7th])