No table is created in the example I provided. I simply use a subquery on the same table with a GROUP BY clause in it. This is necessary because when you use a GROUP BY clause, all columns in the query must be part of an aggregate function (SUM, COUNT, MIN, MAX, etc.), or must be in the GROUP BY clause.
The number of columns does not matter really: there is still one column that is present in both the main query and the subquery with the GROUP BY clause and that is used to perform the equality in the join. In this case it was Type, that you can have in the subquery without an aggregate function because it is the column used for grouping by.
I'm not sure to understand what you try to do with the IIf() function in your expression: Sum ignores the records with Null values in the summed field and always returns a numeric value, be it zero.