@some_function (1)
Function Call
This manual is in pilot operation.
|
In expressions, you can call built-in functions. Functions take multiple arguments (some functions take no arguments) and return a single value. You can perform further calculations or condition checks based on the returned value.
The available functions differ depending on the type of expression.
Function names start with @ .
|
1 | This calls the function named some_function without arguments. Writing @some_function() is the same. |
Arguments are enclosed in () . If there are multiple arguments, they are separated by , .
|
@other_function(1, "a") (1)
1 | This calls the function named other_function with arguments 1 and a . |
The available functions are as follows:
- Function Call
- Functions Available in All Dialects
- Functions Only Usable in Member Selection Expressions
- Functions Usable in Column, Row, and Cell Calculations in Forms
- Functions Usable Outside Ledger Mask Condition Expressions and Excel-Link Text Value Display Conditions
- Functions Usable in Field Value Calculation Expressions
Functions Available in All Dialects
Numeric Calculation Functions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@abs |
|
Returns the absolute value of a number. If the argument is not a number, it returns the value as-is. |
@max |
Any number of arguments |
Returns the maximum value among the arguments. If there are no arguments, or if there are no numbers among the arguments, it returns |
@min |
Any number of arguments |
Returns the minimum value among the arguments. If there are no arguments, or if there are no numbers among the arguments, it returns |
@round |
|
Rounds the fractional part of the number. Rounding towards zero is done for truncation, and rounding towards infinity is done for positive numbers, while rounding towards negative infinity is done for negative numbers. For example, rounding -4.5 to one decimal place results in -5, not -4. The method for specifying decimal places is as follows:
Decimal places can be specified as integers between |
@round_up |
(Same as |
Returns the number rounded up. Rounding towards infinity is done for positive numbers, and rounding towards negative infinity is done for negative numbers. |
@round_down |
(Same as |
Returns the number rounded down. Truncation is done towards zero regardless of whether the number is positive or negative. |
@multiply_fraction |
|
Calculates Arguments 1 to 3 correspond to a to c in the formula above. |
String Manipulation Functions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@is_numeric |
|
Determines whether a string can be interpreted as a number. If it can, returns "True", otherwise returns "False." |
@numeric |
|
Converts a string to a number. |
@left |
|
Extracts If the specified number of characters is negative, it extracts characters from the left side, with the number of characters being (length of the string + specified number). For example, if the string length is 5 and the number of characters is -2, it extracts 3 characters from the left (leaving 2 characters from the right). |
@right |
(Same as above) |
Extracts If the specified number of characters is negative, it extracts characters from the right side, with the number of characters being (length of the string + specified number). For example, if the string length is 5 and the number of characters is -2, it extracts 3 characters from the right (leaving 2 characters from the left). |
@mid |
|
Extracts a substring from a string. The starting position begins at |
@trim |
|
Returns the string with leading and trailing spaces removed. |
@len |
|
Returns the length of the string. |
@text |
|
Returns a string formatted according to the specified format pattern. The format pattern follows the same notation as that used in forms for displaying amounts and numbers. For decimal places, |
@repeat |
|
Returns a string in which the first argument is repeated the number of times specified by the second argument. If the second argument is zero or less, it returns an empty string. |
@find |
|
Returns the position where the search string first appears in the target string. Case is sensitive. If an empty string is specified for the search string, the position immediately after the starting position is considered a match, and the starting position is returned. The starting position specifies where to start the search (starting at 1). If omitted, it is considered to be 1. The return value is the position relative to the start of the target string, regardless of the starting position. If the target string is not found, an error value |
@substitute |
|
Replaces all occurrences of a specific substring in a string. |
@split |
|
Returns the part of the string corresponding to the index after splitting it with the delimiter. The index starts from |
@num_of_chars_of_type |
|
Counts and returns the number of characters of the specified type in the string. Argument 1 represents the character type as an integer. You can specify any of the following, or their sum:
If a sum is specified, the total number of characters belonging to any of the specified types is returned. Argument 2 specifies the string to be inspected. For example, to determine whether the cell specified by
|
@num_of_listed_chars |
|
Counts and returns the number of specified characters in the string. Argument 1 is a string listing the characters to inspect. If the same character is included multiple times, it will be counted for each occurrence, so be aware of this. Argument 2 specifies the target string. For example, to count the number of
|
@asc |
|
Converts full-width characters to half-width characters. Full-width alphanumeric characters and katakana are the targets. Argument 1 is the string to convert. For example, to convert full-width characters to half-width characters in the string value of the cell specified by [PRO_CD], use the following:
|
@jis |
|
Converts half-width characters to full-width characters. Half-width alphanumeric characters and katakana are the targets. Argument 1 is the string to convert. For example, to convert half-width characters to full-width characters in the string value of the cell specified by [PRO_CD], use the following:
|
Date Calculation Functions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@date |
|
Returns a date serial number (integer value). The date serial number is compatible with Excel’s date serial numbers[1]. You can use either a number (e.g., By combining the month number and the month offset, you can easily calculate a date serial number for a fiscal year that differs from the calendar year. Example) The date serial number for April 1, 2020, in a March fiscal year (which corresponds to 2020/7/1):
In a March fiscal year, the fiscal year end is offset by 3 months, so the month offset is Example) The date serial number for April 1, 2021, in a June fiscal year (which corresponds to 2020/10/1):
In a June fiscal year, the fiscal year end is offset by -6 months, so the month offset is If the month offset is not specified, it is considered to be If there is an error in the year, month number, day, or month offset, or if the combination of these values results in an invalid date, the error value
1. However, Excel incorrectly calculates the year 1900 as a leap year, so the values returned by this function are not compatible with Excel’s for dates before 1900/2/28.
|
@year |
|
Returns the year corresponding to the date serial number. |
@month |
|
Returns the month corresponding to the date serial number. |
@day |
|
Returns the day within the month corresponding to the date serial number. |
@day_of_week |
|
Returns the day of the week corresponding to the date serial number.
|
@last_day_of_month |
|
Returns the date serial number for the last day of the month corresponding to the date serial number (considers leap years). |
@week_anchor |
|
Returns the date serial number for the start of the first week when the period starting from the base date is divided into weeks.
|
@week_num |
|
Returns the number of the week containing the target date, based on the week series starting from the start date. If "next week series start date" is specified, any date on or after that date is considered to belong to the next series, and |
Logical Functions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@is_error |
|
Determines whether Argument 1 is an error value. If it is, returns "True", otherwise returns "False." ⚠ If you set a cell range specifier [A] as the first argument instead of a formula, the result of the function will not be "True" even if the value in that cell range is an error. This is because the error value belongs to the value of the cell, not to the cell range itself. Specify member functions explicitly, such as [A].value or [A].total. |
@iferror |
|
If Argument 1 is an error value, returns Argument 2. Otherwise, returns Argument 1. Example:
In this example, if the value of Error values include numeric errors like ⚠ If you set a cell range specifier [A] as the first argument instead of a formula, the result of the function will not be "True" even if the value in that cell range is an error. This is because the error value belongs to the value of the cell, not to the cell range itself. Specify member functions explicitly, such as [A].value or [A].total. |
Functions Only Usable in Member Selection Expressions
The relative_position
function is provided for use in built-in member lists for fiscal years and relative periods. While the opportunity to use the relative_position
function is rare, if you need to use it, please also refer to these built-in member lists.
Please note that the depth
and height
functions, which can only be used in member selection expressions, are different from the functions of the same name with arguments that can be used in column, row, and cell calculations in forms.
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@relative_position |
(None) |
Returns the relative position of the current member, based on the point-of-view member. Usable only in member selection expressions for fiscal year and relative period dimensions. |
@depth |
(None) |
Returns the depth of the current member being inspected in the member selection expression. The starting point for depth calculation is the starting member of the member list (the depth of the starting member of the member list is Skipped members in the member selection expression are also considered in the depth calculation. |
@height |
(None) |
Returns the height of the current member being inspected in the member selection expression. The starting point for height calculation is the lowest member in the member tree (the height of the lowest member is Skipped members in the member selection expression are also considered in the height calculation. |
For details on current member and point-of-view member, please refer to Member Variables. |
Functions Usable in Column, Row, and Cell Calculations in Forms
For details on where these functions can be used, please refer to Dialect List of Text Expressions. |
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@depth |
|
In the target column, row, or cell, if the current member of the dimension specified in Argument 1 is supplied from the member list of the vertical or horizontal axis, it returns the depth of that member in the member list (starting from The depth skips members not included in the member list that are below the starting member in the member tree. For example, if there are three levels of members (A > B > C), and only A and its grandchild C are included in the member list (but B is not), C is considered to have a depth of 1 (A has a depth of 0). If Argument 1 is a string, it is considered a dimension label. |
@height |
|
In the target column, row, or cell, if the current member of the dimension specified in Argument 1 is supplied from the member list of the vertical or horizontal axis, it returns the height of that member in the member list (starting from The height skips members not included in the member list that are below the starting member in the member tree. For example, if there are three levels of members (A > B > C), and only A and its grandchild C are included in the member list (but B is not), A is considered to have a height of 1 (C has a height of 0). If a member appears more than once in the member list, the height is calculated for each occurrence. If Argument 1 is a string, it is considered a dimension label. |
Functions Usable Outside Ledger Mask Condition Expressions and Excel-Link Text Value Display Conditions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@participant_label |
(None) |
Label of the Participant unit responsible for reading/writing the data. |
Functions Usable in Field Value Calculation Expressions
Function | Arguments (Optional arguments are enclosed in []) |
Functionality |
---|---|---|
@field_key |
|
The key of the value field specified for the currently processed value field. You can specify multiple value field keys separated by commas. The first argument of If omitted, it is considered that If a number less than or equal to 0 is specified, or if a number exceeding the number of specified field keys is specified, or if a non-integer value is specified, this function returns an empty string. |