Basically, you are looking to group/aggregate by an attribute.
There are two basic ways to aggregate by an attribute:
The attribute is the parent in the hierarchy. For example, Tomatos roll up to Vegetable.
The attribute is really just an attribute. For example, Products (e.g. tomatos, grapes, etc) are each mapped to a Category (e.g. Vegetable, Fruit). In this case, the only way in Anaplan to aggregate to the group is to create a module (or subsidiary view) that contains Category as a dimension. Then, add a formula in the Sales Line Item of this new module that says something like: ProductSource.Sales[Sum: Products.ProdCategory]
Now, Product Category may be referenced from the Products list itself (i.e. a property in the products list), or sometimes its a (hidden) line item in the Product Sales module. The result is the same either way.
We have a module with product sales that contains a line item named "sales", and includes a list named "Product"
We want to summarize sales by Product Category, which is an attribute property maintained in either the Product List or a module that is based on the product list.
We create a module named Category Sales that contains a line item named sales
in 'Category Sales.Sales', we enter a formula that says "product sales.sales[sum: Product.Category]