There are several ways to aggregate or compute values in Cube, and sometimes, multiple ways exist to perform the same calculation. Not sure what to use for your use case? Here are some examples.
When to use a dimension rollup
Dimensions are organized into a hierarchy of parents and children under each dimension. Child dimension members automatically roll up into their parent dimension to produce a value at the parent level. Learn more about Cube's data model.
You can choose which time rollup type to use (sum, balance, or average) for Account dimension members. Children will automatically sum at the parent level for all other dimension types.
Your dimension rollups will align with your Chart of Accounts and your custom data hierarchy and are your default way to calculate values in Cube.
Note: Reparenting or moving dimension members may affect your rollups and could cause tie-out issues. Consider using tags or formulas for calculations instead when you're not looking to make permanent changes to your dimension hierarchy.
When to use a tag
You can use tags to create an alternative rollup to your Chart of Accounts without changing your dimension hierarchy. Tags sum custom groupings of dimensions and could be used to define certain accounts as Fixed vs. Variable Costs or group departments by their leader.
Tags can be fetched like dimension members when working in your spreadsheets, but they are outside of your dimension hierarchy. This means they will not appear on your dimensions page in your Workspace and cannot be used in formulas.
Learn how to create tags.
When to use a formula
If you want to do more than sum values, you can perform complex calculations using formulas in your Chart of Accounts. Formulas are associated with a particular dimension and can calculate a value based on other Cube dimension members using several supported operations.
Formula dimension members can be used in other formulas, and because they sit in your dimension hierarchy, their values also roll up to their parent dimensions.
For instance, Gross Margin can be added as a formula in Cube by dividing the formula dimension "Revenue" by "Cost of Goods Sold."
The Formulas page in the Workspace shows all formula dimension members and the calculations they perform.