Aggregation is gathering values from a smaller time scale to a larger time scale, such as from days to months or years. Values automatically aggregate between different time scales. However, you can also use functions such as MONTHVALUE or YEARVALUE to reference those aggregated values at coarser time scales.
When two line items have a different time scale, and a formula uses both, values aggregate into the larger time scale. For example, days aggregate into months and months into quarters. This aggregation can also skip levels, so days can aggregate into years.
You can also use functions such as HALFYEARVALUE, MONTHVALUE, QUARTERVALUE, WEEKVALUE, YEARVALUE, or SELECT to aggregate values into different time scales.
Examples
The table below contains data with a Time Scale of Month. It also contains a number of line items that show how you can use different functions to reference the aggregated values at different time scales. However, as each cell is calculated separately, it's often more efficient to use a line item with the time scale required.
Here, Summary of the line item Monthly revenue is set to Sum.
| Jan 22 | Feb 22 | Mar 22 | Q1 FY22 | Apr 22 | May 22 | Jun 22 | Q2 FY22 | H1 FY22 | Jul 22 | Aug 22 | Sep 22 | Q3 FY22 | Oct 22 | Nov 22 | Dec 22 | Q4 FY22 | H2 FY22 | FY22 | |
| Monthly revenue | 50,896 | 52,167 | 51,359 | 154,422 | 44,691 | 43,080 | 51,271 | 139,042 | 293,464 | 53,457 | 50,848 | 42,151 | 146,456 | 51,382 | 48,078 | 47,385 | 146,845 | 293,301 | 586,765 |
Quarter revenue
| 154,422 | 154,422 | 154,422 | 139,042 | 139,042 | 139,042 | 146,456 | 146,456 | 146,456 | 146,845 | 146,845 | 146,845 | |||||||
Half-year revenue
| 293,464 | 293,464 | 293,464 | 293,464 | 293,464 | 293,464 | 293,301 | 293,301 | 293,301 | 293,301 | 293,301 | 293,301 | |||||||
Annual revenue
| 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | 586,765 | |||||||
Average revenue per month
| 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 | 48,897 |
The Years into monthly time scale line item returns a value of 0. This is because values with a Time Scale of Year can't aggregate into a Time Scale of Month.
Note: Values don't aggregate from larger time scales into smaller ones. For example, if Monthly revenue has a time scale of months, and Annual revenue has a time scale of years. Values in the Monthly revenue can aggregate the monthly values into an annual total. However, values in the Annual revenue can't be split into monthly values, as it doesn't contain a value for each month.
Refer to Breakback to learn more about how to distribute a given total value across multiple cells.