The ANY aggregation function returns a TRUE result for any value that matches specific Boolean criteria in a source module.
For example, you can use the ANY aggregation function to identify any employees in an organization with a car allowance.
Syntax
Source[ANY: Mapping, ANY: Mapping 2, etc.]
Arguments
Argument | Data type | Description |
Source | Boolean | The line item to search for any values that match criteria in the Mapping argument. |
Mapping | List | The line item to use as search criteria. If you want to provide multiple criteria, you can repeat this argument. |
The ANY aggregation function returns a Boolean result.
Constraints
- The list that is used to format the mapping line item in the source module must be a dimension of the target line item that uses the ANY aggregation function.
- The dimensions of the mapping line item must also appear in the source line item.
- You can reference the Users list with the ANY function. However, you cannot reference specific users in the Users list as this is production data, which can change and make your formula invalid.
Excel equivalent function
Examples
In this example, the Salary Details module has line items on columns, and the Employees list on rows. The module shows employee car allowances and city locations.
The Car Allowance line item has a Boolean data type. The City line item has a list data type, and is formatted on the City list.
Car Allowance | City | |
Employee A | true | London |
Employee B | true | New York |
Employee C | true | San Francisco |
Employee D | Edinburgh | |
Employee E | New York | |
Employee F | London |
Below, the Any Employee Car Allowance module has the Any location with employee car allowances line item on rows, and the City list on columns. The Any location with employee car allowances line item has a Boolean data type.
The formula uses the ANY aggregation function to show any employees with car allowances in different cities.
London | Edinburgh | San Francisco | New York | |
Any location with employee car allowances
| true | true | true |
Example with two mappings
Another example uses the Salary Details module above, but includes an additional Department line item. Department has a list data type, and is formatted on the Department list.
Car Allowance | Department | City | |
Employee A | true | Sales | London |
Employee B | Sales | London | |
Employee C | true | HR | San Francisco |
Employee D | HR | San Francisco | |
Employee E | true | Marketing | New York |
Employee F | Finance | Edinburgh |
Below, the Any Employee Car Allowance module has the Any location with employee car allowances line item on pages, the Department list on rows, and the City list on columns. The Any location with employee car allowances line item has a Boolean data type.
The formula in the line item uses the ANY aggregation function to show any employees with car allowances in different cities and departments: Salary Details.Car Allowance[ANY: Salary Details.City, ANY: Salary Details.Department]
.
The formula only returns a TRUE result if any employee in a department or city has a car allowance.
London | Edinburgh | San Francisco | New York | |
Sales | true | |||
HR | true | |||
Marketing | true | |||
Finance |