Forum Discussion

chem094's avatar
chem094
Frequent Visitor
4 years ago
Solved

Lookup & Match from separate table

Hi All, I need to check a lookup table to choose the category. Column A has list of values (some duplicate names) and text search on the column A values gave multiple categories.. i have values in listed the categories in column C but multiple matching due to text search done in column A. Now, i need to have column D with final category for the column names using a hierarcy order table..can we do this in M query   

3 Replies

  • How are you grouping the products in column A? How do we know "Laptop Co Pub limited" and "Laptop Dell Corp" are different groups but "Laptop Co Pub limited" and "Laptop Univ" are in the same group?

    • chem094's avatar
      chem094
      Frequent Visitor

       

      if you see in above table, i have one institution with 3 valid keywords, using keywords i mapped to all the categories. but in final category should be "Ëducation" using hierarcy table. So, education should be filled in all the 3 lines in final category column this duplicates can be removed at end stage based on institution name and finalcategory. 

  • Hi, chem094 

     

    Based on the information above, what you want to achieve is to return the highest parent category in the parent-child hierarchy.
    Please use the solution I provided in the other thread you posted.

    Refer:
    https://community.powerbi.com/t5/Power-Query/Group-by-duplicate-column-to-lookup-Hierarchy-Table-for-multiple/td-p/2332334

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.