Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric certified for FREE! Don't miss your chance! Learn more
I have a table like so:
I would like to remove duplicate rows such that I only keep the document which has the highest revision. Any help is appreciated. Result:
Thank you.
Solved! Go to Solution.
Hi @Nozama, check this:
Output
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMgIBJR0lQ6VYnWglQxAA8ozAPJicEYqcMYqcCZhnDAIYPFMUfWYochZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Document = _t, Revision = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Revision", Int64.Type}}),
KeepMaxRevisionRow = Table.Combine(Table.Group(ChangedType, {"Document"}, {{"T", each Table.MaxN(_, {"Revision"}, 1), type table}})[T])
in
KeepMaxRevisionRow
Hi @Nozama, check this:
Output
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMgIBJR0lQ6VYnWglQxAA8ozAPJicEYqcMYqcCZhnDAIYPFMUfWYochZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Document = _t, Revision = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Revision", Int64.Type}}),
KeepMaxRevisionRow = Table.Combine(Table.Group(ChangedType, {"Document"}, {{"T", each Table.MaxN(_, {"Revision"}, 1), type table}})[T])
in
KeepMaxRevisionRow
Hi @Nozama Ypu could achive this by Group By Please try this
Thanks for that. I think it worked (sort of). I added the step but the result got rid of all the other columns in the table!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 12 | |
| 10 | |
| 6 | |
| 5 |