@some_function (1)
Calling Functions
This manual is in pilot operation.
|
In expressions, you can call built-in functions. A function takes one or more arguments (some functions take no arguments) and returns a single value. You can then perform further calculations or conditional evaluation based on the returned value.
Available functions differ depending on the type of expression.
Function names start with @.
|
| 1 | Calls the function named some_function without arguments. Writing @some_function() has the same meaning. |
Arguments are enclosed in (). If there are multiple arguments, separate them with ,.
|
@other_function(1, "a") (1)
| 1 | Calls the function named other_function with the arguments 1 and a. |
Available functions are as follows.
- Calling Functions
- Functions Available in All Dialects
- Functions Available Only in Member Criteria Expressions
- Functions Available in Form Column Expressions, Row Expressions and Cell Expressions
- Functions Available in Expressions Other than Ledger Mask Conditions and Excel-Link Text Value Display Conditions
- Functions Available in Field Value Expressions
Functions Available in All Dialects
Numeric Functions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@abs |
|
Returns the absolute value of the numeric value. If the argument is not numeric, returns it as is. |
@max |
Any number of arguments |
Returns the maximum numeric value among the arguments. If there are no arguments or there is no numeric argument, returns |
@min |
Any number of arguments |
Returns the minimum numeric value among the arguments. If there are no arguments or there is no numeric argument, returns |
@round |
|
Rounds the fractional part of the numeric value and returns it. Rounding down is performed toward zero rather than toward negative infinity, and rounding up is performed toward positive infinity if the value is positive and toward negative infinity if the value is negative. For example, if you round -4.5 to the first decimal place, the result is -5, not -4. Number of digits is specified as follows:
For the number of digits, you can specify an integer between |
@round_up |
Same as |
Rounds up the fractional part of the numeric value and returns it. Rounding up is performed toward positive infinity if the value is positive and toward negative infinity if the value is negative. |
@round_down |
Same as |
Rounds down the fractional part of the numeric value and returns it. Rounding down is always performed toward zero regardless of the sign of the value. |
@multiply_fraction |
|
Calculates The 1st to 3rd arguments correspond to a to c above in that order. |
@power |
|
Calculates the power of a numeric value, and if the 3rd argument is specified, multiplies the result by 10 to the power of n and returns it. The power is calculated using double-precision floating-point arithmetic. Fractional parts are rounded at the fourth decimal place. Rounding is performed after applying the scaling factor. (Numeric examples)
For concrete examples, please refer to Q&A: Calculating NPV (Net Present Value) and IRR (Internal Rate of Return) in Forms (fusion_place >= 15.0). |
String Functions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@is_numeric |
|
Determines whether the string can be interpreted as a numeric value. If it can be interpreted, returns The 1st argument is the target string for evaluation. The 2nd argument is a Boolean value. |
@numeric |
|
⚠ The rounding mode (2nd argument) is as follows (case-insensitive):
⚠ A string containing exponential notation can be converted to a numeric value. (fusion_place >= 14.2) |
@left |
|
Returns the leftmost If the specified number of characters is negative, returns a string of length (string length + number of characters) from the left side. For example, if the string length is 5 and the number of characters is -2, returns the leftmost 3 characters (leaving 2 characters on the right). |
@right |
Same as above |
Returns the rightmost If the specified number of characters is negative, returns a string of length (string length + number of characters) from the right side. For example, if the string length is 5 and the number of characters is -2, returns the rightmost 3 characters (leaving 2 characters on the left). |
@mid |
|
Returns a substring from the string. The start position is |
@trim |
|
Returns the string with leading and trailing spaces removed. |
@len |
|
Returns the length of the string. |
@text |
|
Returns a string that formats the numeric value according to the format pattern. The format pattern uses the same notation as the patterns available in Display Methods of Amounts and Numbers in Forms. The scaling factor specifies the power of |
@repeat |
|
Returns a string that repeats the string specified by the 1st argument as many times as specified by the 2nd argument. If the 2nd argument is zero or less, returns an empty string. |
@find |
|
Returns the position where the search string first appears in the target string. Case-sensitive. If an empty string is specified as the search string, it is considered to match just after the start position, and the start position is returned. The start position specifies where to begin searching (1 is the first character). If omitted, it is treated as 1. The return value is the position counted from the first character regardless of the start position. If the target string is not found, the error value |
@substitute |
|
Replaces all occurrences of a specific substring in the string. |
@split |
|
Returns the |
@num_of_chars_of_type |
|
Counts how many characters of the specified character type exist in the string and returns the count. The 1st argument is an integer representing a character type. Specify one of the following or any sum of them:
If a sum is specified, returns the total number of characters that belong to any of the selected character types. The 2nd argument specifies the string to be checked. For example, to check that the cell specified by
|
@num_of_listed_chars |
|
Counts how many occurrences of the specified characters exist in the string and returns the count. The 1st argument is a string that lists the characters to be checked. Be aware that if the same character appears multiple times in the list, each occurrence is counted. The 2nd argument specifies the string to be checked. For example, to count the number of
|
@asc |
|
Converts full-width characters in the string to half-width characters. Targets include full-width alphanumeric characters, symbols and Katakana. The 1st argument is the string to be converted. For example, to convert full-width characters contained in the string value of the cell specified by [PRO_CD] to half-width characters, use the following:
|
@jis |
|
Converts half-width characters in the string to full-width characters. Targets include half-width alphanumeric characters, symbols and Katakana. The 1st argument is the string to be converted. For example, to convert half-width characters contained in the string value of the cell specified by [PRO_CD] to full-width characters, use the following:
|
Date Functions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@date |
|
Returns a date serial number (integer). The date serial number is compatible with Excel date serial numbers[1]. Values passed to this function can be numeric (for example By combining the month number and the month offset, you can easily obtain date serial numbers even when the fiscal year differs from the calendar year. Example) Date serial number for April 1st in Fiscal Year 2020 with March year-end ( = 2020/7/1):
With a March year-end, the fiscal year end month is shifted by 3 months after the calendar year end, so MonthOffset = 3. Example) Date serial number for April 1st in Fiscal Year 2021 with June year-end ( = 2020/10/1):
With a June year-end, the fiscal year end month is shifted by 6 months before the calendar year end, so MonthOffset = -6. If the month offset is not specified, it is treated as If any of year, month, day or month offset is invalid, or if the combination does not form a valid date, the error value
1. However, Excel incorrectly treats the year 1900 as a leap year when calculating date serial numbers, so for dates on or before 1900/2/28, the values returned by this function are not compatible.
|
@year |
|
Returns the calendar year of the date represented by the date serial number. |
@month |
|
Returns the calendar month of the date represented by the date serial number. |
@day |
|
Returns the day of the month of the date represented by the date serial number. |
@day_of_week |
|
Returns the day of the week of the date represented by the date serial number.
|
@last_day_of_month |
|
Returns the date serial number of the last day of the month to which the date represented by the date serial number belongs (considering leap years). |
@week_anchor |
|
Returns the date serial number of the first day of the first week when subdividing the attribution period into weeks, that is, the first day of Week 1.
|
@week_num |
|
Returns the week number of the week that contains the target date in the week sequence starting from the start date of the week sequence. If the “start date of the next week sequence” is specified, dates on or after that date are regarded as belonging to the next week sequence (for example, next year). In that case, |
Logical Functions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@is_error |
|
Determines whether the 1st argument is an error value. If it is an error value, returns ⚠ If you specify a cell range specifier [A] instead of an expression as the 1st argument, the result of this function will not be |
@iferror |
|
If the 1st argument is an error value, returns the 2nd argument. Otherwise returns the 1st argument. Example:
In the above example, if the value of Error values include ⚠ If you specify a cell range specifier [A] instead of an expression as the 1st argument, the result of this function will not be |
Functions Available Only in Member Criteria Expressions
The relative_position function is provided for use with the built-in member lists of Fiscal Year and Relative Period. Use cases for the relative_position function are assumed to be rare, but if you need to use it, refer also to these built-in member lists.
The depth and height functions that are available only in Member Criteria Expressions are different functions from the functions with the same names that take arguments and are available in Form column expressions, row expressions and cell expressions, so be careful not to confuse them.
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@relative_position |
None |
Returns the relative position of the current member with respect to the POV member. Available only in Member Criteria Expressions for Fiscal Year and Relative Period dimensions. |
@depth |
None |
Returns the depth of the member currently being evaluated in a Member Criteria Expression (current member). The starting point for calculating depth is the starting member of the member list (the depth of the starting member of the member list is Members that are skipped in Member Criteria Expressions are also considered when calculating depth. |
@height |
None |
Returns the height of the member currently being evaluated in a Member Criteria Expression (current member). The starting point for calculating height is the lowest member of the member tree (the height of a lowest-level member is Members that are skipped in Member Criteria Expressions are also considered when calculating height. |
@find_in_path |
|
Starting from the starting member, searches along the path to the current member and returns the first member that meets the conditions specified by the 1st and 2nd arguments. For how to specify the conditions, see Filtering Members by Member Classification Properties. For concrete examples, please refer to Q&A: @find_in_paht Function Samples (fusion_place >= 15.0). |
| For details of current member and POV member, please refer to Member Variables. |
Functions Available in Form Column Expressions, Row Expressions and Cell Expressions
| For details on where these functions are available, please refer to Dialects of Text Expressions. |
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@depth |
|
In the target column, row or cell, if the current member for the dimension specified by the 1st argument is supplied from the vertical or horizontal member list, returns the depth of that member within that member list ( Depth is counted by skipping members that are under the starting member of the member list in the member tree but not included in the member list. For example, if there are three hierarchical members A > B > C, and the starting member A and its grandchild C are included in the member list but B is not, the depth of C is 1 (the depth of A is 0). If the 1st argument is a string, it is treated as a dimension label. |
@height |
|
In the target column, row or cell, if the current member for the dimension specified by the 1st argument is supplied from the vertical or horizontal member list, returns the height of that member within that member list ( Height is counted by skipping members that are under the starting member of the member list in the member tree but not included in the member list. For example, if there are three hierarchical members A > B > C, and the starting member A and its grandchild C are included in the member list but B is not, the height of A is 1 (the height of C is 0). If a member appears more than once in a member list, height is calculated separately for each occurrence. If the 1st argument is a string, it is treated as a dimension label. |
@translate |
|
In the target column, row or cell, converts any object to a string, then applies the specified Translation Table. If the specified Translation Table does not exist, If there is no translation rule in the Translation Table that corresponds to the pre-translation value, If the translation result of the rule corresponding to the pre-translation value is Each error value is treated as an error by the |
Functions Available in Expressions Other than Ledger Mask Conditions and Excel-Link Text Value Display Conditions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@participant_label |
None |
Returns the label of the Participant that is reading or writing data. |
Functions Available in Field Value Expressions
| Function | Arguments (If optional, enclose with []) |
Description |
|---|---|---|
@field_key |
|
Returns the Value Field Key specified for the Value Field currently being processed. Multiple Value Field Keys can be specified for a single Value Field separated by commas. The 1st argument of If omitted, it is treated as if If a value less than or equal to 0 is specified, or if a number greater than the number of keys specified for the field is specified, or if a non-integer value is specified, this function returns an empty string. |