Forum Discussion
divumj
2 years agoHelper I
Comparing data in same data set
Hi all I am trying to find the rows where balances are exactly same and against that I have to add comments some thing like match. For e.g. S.no. name balance comment 1. Mohit. 100...
AlienSx
2 years agoSuper User
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLNz8gsAdKGBgZKsTrRSkZAtl9qRiKQMoIKGQPZwaV5mSWJMHWxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [S.no = _t, name = _t, balance = _t]),
group = Table.Group(
Source,
"balance",
{{"all", each _}, {"comment", each Table.RowCount(_)}}
),
match = Table.TransformColumns(group, {"comment", each if _ = 1 then "No match" else "Match"}),
expand = Table.ExpandTableColumn(match, "all", {"S.no", "name"})
in
expand