Forum Discussion
combining 2 rows into 1 by ID
- 6 years ago
data123456789 - In Power Query editor you should be able to use Group By
- 6 years ago
Use Group By. Make sure that what you show as "null" in your table is actually of type null in the table (and not the string null)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyNlHSUaqoqACSpkBsaAAklGJ10KQgyNDAQCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Time = _t, A = _t, B = _t, C = _t]), #"Grouped Rows" = Table.Group(Source, {"ID", "Time"}, {{"A", each List.Max([A]), type text}, {"B", each List.Max([B]), type text},{"C", each List.Max([C]), type text}}) in #"Grouped Rows"Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- 6 years ago
You could get it by use Group By in Edit Queries:
Result:
Regards,
Lin
Use Group By. Make sure that what you show as "null" in your table is actually of type null in the table (and not the string null)
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyNlHSUaqoqACSpkBsaAAklGJ10KQgyNDAQCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Time = _t, A = _t, B = _t, C = _t]),
#"Grouped Rows" = Table.Group(Source, {"ID", "Time"}, {{"A", each List.Max([A]), type text}, {"B", each List.Max([B]), type text},{"C", each List.Max([C]), type text}})
in
#"Grouped Rows"
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers