Forum Discussion

RyanHare92's avatar
RyanHare92
Icon for Helper I rankHelper I
2 years ago
Solved

Comparing values in columns and showing difference

Hi, I have two columns, each one of them has a list in each row of certain values. I want to compare the two columns and show which values in the second column are not present in the first. The fo...
  • ThxAlot's avatar
    2 years ago
    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjDUMTDSMTBW0oExTZRidYDiIJaOgSlIHCSvY2CmFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
        #"Added Diff" = Table.AddColumn(Source, "Diff", each Text.Combine(List.Difference(Text.Split([Column2],","), Text.Split([Column1],",")),","))
    in
        #"Added Diff"