Forum Discussion

ayushmittal22's avatar
ayushmittal22
Frequent Visitor
3 years ago

LOOKUP VALUE

Hi, 

I am using LOOKUPVALUE to fetch the Category for any Product from a different table.

For ex- Shampoo belongs to Hair care. 

But when using LOOKUP, it is showing as NOT FOUND because, in the table, another record/row says Shampoo is Personal Care. 

I want Power BI to return the first value/second value it encounters.

Need to make it return some value. 

I cannot change any of the data since rows are >2 Million+.

Or is there any other method to do VLOOKUP/LOOKUP

Please help anybody.

amitchandak FreemanZ tamerj1 

1 Reply

  • AlB's avatar
    AlB
    Community Champion

    Hi ayushmittal22 

    Do share a sample of your data to help finding a solution.

    You could add a calculated column to your first table

     

    NewCol =
    VAR prod_ = Table1[Product]
    RETURN
    CALCULATE( MIN(Table2[Category]), Table2[Product] = prod_)
    
    

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.