I'm not Paulie78, but I still post my thoughts 😉

Compose
Your JSON
Select
From
chunk(
union(
xpath(
xml(json(concat('{"Root":{"Item":', body('Compose'),'}}'))),
'//Item/AccountID/text() | //Item/Unit/text()'
),
json('[]')
),
2
)
Map AccountID
first(item())
Map Unit
last(item())
Map Incentive
xpath(
xml(json(concat('{"Root":{"Item":', body('Compose'),'}}'))),
concat('sum(//Item[AccountID="', first(item()), '" and Unit="', last(item()), '"]/Incentive)')
)
