Forum Discussion

ti-fpe's avatar
ti-fpe
New Member
3 years ago
Solved

Filter column values in Table 1 which the same value exists in a column Table 2 and Table 3

Hello all!

 

Is there a way to filter column values in Table 1 if only the values exists in a column in the Table 2 and Table 3?

  • Hi ti-fpe,

     

    yes, something like this:

    let 
        t1 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnICskzALGcgy0wpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Team = _t, Numbers = _t]),
        t2 =  Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWBsIzhLBM4yxTMcgKyDOAsCywsS6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Team = _t, Small = _t]),
        Custom1 = Table.SelectRows(t2, each List.Contains(t1[Numbers], [Small]))
    in
        Custom1

     

    Cheers,

    John

1 Reply

  • jbwtp's avatar
    jbwtp
    Icon for Memorable Member rankMemorable Member

    Hi ti-fpe,

     

    yes, something like this:

    let 
        t1 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnICskzALGcgy0wpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Team = _t, Numbers = _t]),
        t2 =  Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWBsIzhLBM4yxTMcgKyDOAsCywsS6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Team = _t, Small = _t]),
        Custom1 = Table.SelectRows(t2, each List.Contains(t1[Numbers], [Small]))
    in
        Custom1

     

    Cheers,

    John