Hi @NRS-BNE
The amount paid is also duplicated => An Average should do the job then
Group your table by [ID] and do 2 aggregations: Sum([Disc]) and Avg([Paid])
let
// Table for demo:
Source = Table.FromColumns({
{1,1,1,2,3,3,3,3,4,4},
{2,3,4,4,2,3,4,5,1,2},
{15,15,15,10,20,20,20,20,17,17}},
type table [ID=Int64.Type, Disc=number, Paid=number]
),
GroupedRows = Table.Group(Source, {"ID"},
{
{"NO", each List.Sum([Disc]), type nullable number},
{"Disc Paid", each List.Average([Paid]), type nullable number}
}
)
in
GroupedRows