Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

IF + Lookupvalue from partial text

Hi Power User!   I have the following tables:   TABLE 1 Code 1 Description 1 Code 2 Description 2 Code 3 1.10 Text 1 1.10.1 Text 1 1.10.1 1.100 Text 2 1.10.2 Text 2 1.100.2 ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    i guess ... this approach

    let 
    Table2= ... 
    tt=Table.AddColumn(Table2, "Code 12", each Table.SelectRows(Table1, (r)=>Text.BeforeDelimiter(r[Code 3],".",2 )=Text.BeforeDelimiter(_[Code 3],".",2))),
    
     #"Expanded Code 12" = Table.ExpandTableColumn(tt, "Code 12", {"Code 1", "Code 2"}) 
    in 
    #"Expanded Code 12"