Forum Discussion

rpinxt's avatar
rpinxt
Solution Sage
1 year ago
Solved

Lookup in Power Query Editor

I have 2 table which I cannot merge due to granularity: This is the main:   And this is the other:   So wanted to merge them on country and then get category in the main table. Look...
  • rpinxt's avatar
    1 year ago

    Ok I was able to find a solution found in a power query video explaining this.
    Would think it would be easier, not that it is hard but it looks more like a workaround.

    = #"*V* Category"[Category]{List.PositionOf(#"*V* Category"[Country],[Country])}

     

    Looking first up where the poistion is of the category

    x = List.PositionOf(#"*V* Category"[Country],[Country])

    and than use that to get the actual category...
    - #"*V* Category"[Category]{ x }

     

    Maybe there are better and easier solutions for when merge doesn't work but I will go with this for now ๐Ÿ™‚