Forum Discussion

mariomaraucci's avatar
mariomaraucci
New Member
4 years ago
Solved

Power Query - Replace values based on another table's data

Hi, I am new to the Power Query world and this community ğŸ™‚   I'm struggling with a task -  I have a table "All_Skills" that contains 2 columns like this: Skill Center Licensing Other B...
  • Vijay_A_Verma's avatar
    4 years ago

    Use a custom column and put following formula there

    = Text.Combine(List.Transform(Text.Split([Interaction],">"),(x)=>try All_Skills{[Skill=Text.Trim(x)]}[Center] otherwise null)," > ")

    See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8slMTs0rzsxLV4gpNTAwTj20wCkzJwfE98wrLM0sykwthssEJFbmpuaVKKSk5mWmpijF6kQr4Vbsk1hQkl+gUJRakJOYnArSB9bgk5lXWqFQXFpQkF9UgldxLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Interaction = _t]),
        #"Added Custom" = Table.AddColumn(Source, "Interactions_Center", each Text.Combine(List.Transform(Text.Split([Interaction],">"),(x)=>try All_Skills{[Skill=Text.Trim(x)]}[Center] otherwise null)," > "))
    in
        #"Added Custom"