Use the COLLECT function in a module that includes a line item subset to pull the source line item values into the module.
For example, you might want to compare 2 months and view the variance between those months for different line items.
To create a comparison, create a line item subset to group line items from different modules in one place. Then, create a staging module and pull the data from the line items into the module using the COLLECT function.
Syntax
COLLECT()
Arguments
The COLLECT function does not use any arguments.
This function returns numbers.
Additional information
The source modules must contain the line items in the line item subset used in the result module. The result module must have a line item subset as a dimension.
See Line item subset example for more information.
The function's behavior may change if there’s a mismatch in list hierarchy for the applied dimensions of line items within a line item subset.
Examples
General example
The COLLECT function can be used to collect values from a line item subset. In this example, the two source modules for the line item subset are named P&L and Fixed assets. The aggregated total for FY22 from the Time dimension displays as the single column in both modules, and line items on rows.
P&L module:
FY22 | |
Sales last year | 1200000 |
% increase | 5% |
Sales | 1260000 |
Margin % | 40% |
Cost of Sales | 756000 |
Gross Margin | 2016000 |
Headcount | 10 |
Cost per employee | |
Staff Costs | 360000 |
Rent & Rates | 12000 |
Utilities | 12000 |
Marketing | 12000 |
IT costs | 12000 |
Total Overheads | 408000 |
Operating Profit | 1608000 |
Revenue module:
FY22 | |
Assets Sold | 720000 |
Buildings | 120000 |
Fixtures | 120000 |
Software | 120000 |
Patents | 120000 |
Assets Purchased | 480000 |
The line items selected for the line item subset display as below within Line item subsets . The line item subset is named Receipts and Payments.
Receipts and Payments | |
P&L | |
Sales last year | |
% increase | |
Sales | true |
Margin % | |
Cost of Sales | true |
Gross Margin | true |
Headcount | |
Cost per employee | |
Staff Costs | true |
Rent & Rates | true |
Utilities | true |
Marketing | true |
IT costs | true |
Total Overheads | true |
Operating Profit | true |
Fixed assets | |
Assets Sold | true |
Buildings | true |
Fixtures | true |
Software | true |
Patents | true |
Assets Purchased | true |
The above line item subset is used for the rows dimension in a Receipts and Payments module. FY22 from the Time dimension is on columns, and a single line item is on the pages dimension. The line item contains this formula: COLLECT()
. This collects the values from the P&L and Fixed Assets source modules:
FY22 | |
Sales | 1260000 |
Cost of Sales | 756000 |
Gross Margin | 2016000 |
Staff Costs | 360000 |
Rent & Rates | 12000 |
Utilities | 12000 |
Marketing | 12000 |
IT costs | 12000 |
Total Overheads | 408000 |
Operating Profit | 1608000 |
Assets Sold | 720000 |
Buildings | 120000 |
Fixtures | 120000 |
Software | 120000 |
Patents | 120000 |
Assets Purchased | 480000 |
Line item subset example
The Variance report staging module step of the Line item subset example contains an example of how you can use the COLLECT function.