Forum Discussion

Daniel_L's avatar
Daniel_L
Frequent Visitor
7 years ago
Solved

Merge with wildcards

Hello Power BI Community, I need to find (in other words set a flag for) the rows in table A which matches any of the rows in Table B. If it wasn't for the wildcards (*) it would have been easy to...
  • v-chuncz-msft's avatar
    7 years ago

    Daniel_L,

     

    You may use code below to add a custom column.

    let
        r = _
    in
        Table.MatchesAnyRows(
            Rules,
            each List.Contains({r[Company], "*"}, [Company2])
            and List.Contains({r[Div], "*"}, [Div2])
            and List.Contains({r[Dept], "*"}, [Dept2])
            and List.Contains({r[Invoice], "*"}, [Invoice2])
        )