Forum Discussion

Lukas_317's avatar
Lukas_317
Regular Visitor
4 years ago
Solved

If or other functions

Hi, evrybody How to find positions and compare to other value, when you have two tabels on data? e.g. Table A  I7-8700 i7-1185G7 Athlon(tm) II X2 215 i7-1185G7 i5-8500 Tabela B ...
  • lbendlin's avatar
    4 years ago

    Table A

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8jTXtTA3MFCK1YlWyjTXNTS0MHU3B/McSzJy8vM0SnI1FTw9FSKMFIwMTbEoyzTVtTAFGRALAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}})
    in
        #"Changed Type"

     

     

    Table B

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8swrSc3RCNJUcM4vStUI8dVUyDTXtTA3MFBwDghVcFAw1jMycPeoUorVwarWVNfCFEmtAVytoWFJhoJ7ap4CVk2Ghiam7uZALUZ6ZkRpMQdqsYBoQbbF0ddFwbEkIyc/T6MkV1PB01MhwkjByNBUIaAoPzm1uDi/CLfDLc0MDLzhLjeHmBkLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        Compare = (c)=> List.AnyTrue( Table.AddColumn(#"Table A","Match",each Text.Contains(c,[Column1],Comparer.OrdinalIgnoreCase))[Match]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
        #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Compare([Column1]))
    in
        #"Added Custom"