Forum Discussion
Special group by (group until column value change)
- Anonymous4 years ago
I would buffer your table once you have your sort order as you like it. Then, you can just add the optional parameter at the end of your group function--GroupKind.Local. This scenario is exactly the purpose for which it's used.
--Nate
- 4 years ago
Hi,
the solution provided by watkinnc is perfect and without it i wouldn't be able to help you.
Only in order to help if it is not clear i show the steps i have applied to achive the result you wanted to obtain:
Starting from your data you have to Group By
You obtain this line
= Table.Group(#"Changed Type", {"Type"}, {{"Date1", each List.Min([Date]), type nullable datetime}, {"TotAmount", each List.Sum([Amount]), type nullable number}})
Now you to modify it by adding GroupKind.Local
= Table.Group(#"Grouped Rows1", {"Type"}, {{"DateMin", each List.Min([Date]), type nullable datetime}, {"TotAmount", each List.Sum([Amount]), type nullable number}},GroupKind.Local)
Nothing else.
If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !
Hi,
the solution provided by watkinnc is perfect and without it i wouldn't be able to help you.
Only in order to help if it is not clear i show the steps i have applied to achive the result you wanted to obtain:
Starting from your data you have to Group By
You obtain this line
= Table.Group(#"Changed Type", {"Type"}, {{"Date1", each List.Min([Date]), type nullable datetime}, {"TotAmount", each List.Sum([Amount]), type nullable number}})
Now you to modify it by adding GroupKind.Local
= Table.Group(#"Grouped Rows1", {"Type"}, {{"DateMin", each List.Min([Date]), type nullable datetime}, {"TotAmount", each List.Sum([Amount]), type nullable number}},GroupKind.Local)
Nothing else.
If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !