Take a look at the code snippet I used to successfully solve the problem:
self.checkIfAllItensSumUpToHundred = () => {
const sumOfGroupedItems = Enumerable
.From(self.billingData().settings())
.Where("$.groupId != null && $.groupId != -1")
.GroupBy("{ groupRuleId: $.groupRuleId,
groupId: $.groupId
}",
"parseFloat($.percentage)",
"{ groupRuleId: $.groupRuleId,
groupId: $.groupId,
total: parseFloat($$.Sum()).toFixed(2)
}",
"$.groupRuleId + '-' + $.groupId")
.ToArray();
const itemsWithIncorrectTotal = Enumerable
.From(sumOfGroupedItems)
.Where("$.total < 100 || $.total > 100")
.ToArray();
return itemsWithIncorrectTotal.length;
};