Note: some features require Velixo v5 or higher
There are several methods that can help us do that:
- separating values with a semi-column ( ; ) or comma ( , )
- using a range of values ( START:END )
- using a wildcard ( ? )
- including all values for the argument ( * )
- subtracting specific values ( - )
- filtering a range using intersection ( ^ )
Add multiple entities with a semi-colon ( ; ) or comma ( , )
To include multiple entities in the arguments of a function, we can use a semi-colon to separate each one. The use of commas is also supported but not recommended since it is also the thousands separator in many locales.
In this example, the three accounts we want to include are separated by a semicolon.
Example: =ACCOUNTENDINGBALANCE("Demo", ACTUAL,,"10100;10200;10300",,,"09-2019")
Using a range ( START:END )
To include all entities of a range, we use a colon to denote that our values are the starting and ending values of the range.
In this example, the range is defined as starting with 10100 and ending with 11500.
Example: =ACCOUNTENDINGBALANCE("Demo", ACTUAL,,"10100:11500",,,"09-2019")
We can also combine semicolon lists and ranges. In this example, we are retrieving the ending balance for accounts 10100 through 10300 and also including account 10600
Example: =ACCOUNTENDINGBALANCE("Demo", ACTUAL,,"10100:11300;10600",,,"09-2019")
Wildcard operator ( ? )
To add all entities that match a pattern, we use a question mark (?) in the argument of a function, to denote "any character". This operator can be used at any point in the pattern, such as "10???", "??999", and "1???0".
In this example, three question marks follow the first two digits of the account number. The result will include only those accounts that begin with 10.
In this example, the two question marks at the beginning of the account number will result in including only those accounts that end with 999.
Everything operator ( * )
To add all available entities in the argument of a function, we can use an asterisk (*).
In the example below, the asterisk specifies that every branch will be included. This is effectively the same as leaving the argument empty.
Let's say, for example, that we want to calculate the balance of an account for every branch except a few branches. We can't use the ? wildcard for our branch (unless the names all our branch identifiers are of the same length), and it's tedious to write out a long list of the accounts. By using the * operator, we can easily include or exclude the branches we want.
Subtractor operator ( - )
We can use the Subtractor operator with the Account, Subaccount, or Branch arguments to exclude certain values from a range in these GL/Accounting functions:
This operator can also be put to use in the following arguments found in many of the Project Module Functions:
Subtracting multiple entities
Often, it is inefficient to list all the branches to include. It is possible to use the Subtractor operator to subtract many entities from a range.
In this example, we use the Subtractor to exclude the SERVEAST, SERVWEST, and PRODRETAIL branches:
Example: =ACCOUNTENDINGBALANCE("Demo", "ACTUAL",,"49300",,"*;-SERVEAST;-SERVWEST;-PRODRETAIL","12-2019")
Another example where this would be useful is in a project report where we want to calculate expenses and exclude specific item codes, as with"*;-TRAVEL".
Intersection operator ( ^ )
Sometime we want to use a range for our argument, but really only want to include certain values from that range. To accomplish this, we can specify an intersection with the ^ operator.
- Department code, ranging from 100 to 500:
- 100 - Purchasing
- 200 - Production
- 300 - Marketing & Sales
- 400 - R&D
- 500 - HR & Administrative
- Geographical area, ranging from 1 to 3:
- 1 - North & South America
- 2 - EMEA
- 3 - Asia-Pacific
- The first part (100-1:400-1) still allows subaccounts 100-1, 100-2, …, through 400-3 - not what we want per se.
- The second part (???-1) allows any subaccount value that relates specifically to the North & South America geographical area: 100-1, 200-1, 300-1, 400-1, and 500-1 - also not what we want per se (it includes HR & Administrative).
- The intersection operator allows only subaccount values that satisfy both parts of the expression.
For example, in an expression like A^B^C^D, where A, B, C, and D are range expressions, a particular subaccount value will only be included in the results if it is already included in range A and range B and C and range D.