One solution, at least until i find a better one, is to filter out the the rows which have only NULL-values within the grouping. This may help, if you dont need all of the data.
More complex, you create a second select for the grouping, using only rows without NULL-values, joining this to the base select (with grouping, but no aggregation) and fill the empty rows with some other value, if you dont want it to be NULL values. That was my choice, when i needed all data.
Looks like that:
select d.grp,case when d2.sum_sales is null then 0 else d2.sum_sales from dataset d group by d.grp left join (select grp, sum(sales) as sum_sales from dataset where sales is not null group by grp) d2 on d.grp = d2.grp;