Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Adding column based on value from other table

I am attempting to essentially do a VLOOKUP in Power BI. I am trying to create a column that adds a supplier's name. The tables that I am using for this do not have the information required in the cu...
  • AlexisOlson's avatar
    AlexisOlson
    4 years ago

    What I suggested should work for calculated columns but with a measure, it doesn't automatically know which id value you want to look up (since there isn't the same row context that exists for a calculated column).

     

    Try adding an aggregation as the error message indicates:

    LOOKUPVALUE (
        item[supplier_name],
        item[supplier_id], SELECTEDVALUE ( invoice[supplier_id] )
    )