Function Call

Designer Administrator
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 @.
  @some_function (1)
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:

Functions Available in All Dialects

Numeric Calculation Functions

Function Arguments
(Optional arguments are enclosed in [])
Functionality

@abs
(fusion_place >= 10.0)

Argument 1

Number

Returns the absolute value of a number.

If the argument is not a number, it returns the value as-is.

@max
(fusion_place >= 10.0)

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 0.

@min
(fusion_place >= 10.0)

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 0.

@round

Argument 1

Number

Argument 2

Number: Decimal places

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:

  1. Keep only the integer part (round to one decimal place) — Decimal places 0

  2. Keep up to one decimal place (round to two decimal places) — Decimal places 1

  3. Keep up to two decimal places (round to three decimal places) — Decimal places 2

  4. Keep above the tens place (round to the nearest one) — Decimal places -1

  5. Keep above the hundreds place (round to the nearest ten) — Decimal places -2

Decimal places can be specified as integers between -14 and 4.

@round_up

(Same as @round)

Returns the number rounded up. Rounding towards infinity is done for positive numbers, and rounding towards negative infinity is done for negative numbers.
The method for specifying decimal places is the same as @round.

@round_down

(Same as @round)

Returns the number rounded down. Truncation is done towards zero regardless of whether the number is positive or negative.
The method for specifying decimal places is the same as @round.

@multiply_fraction

Argument 1

Number: Multiplier

Argument 2

Number: Numerator

Argument 3

Number: Denominator

Calculates a * b / c without intermediate rounding or overflow. The result is rounded to the fifth decimal place, and the final result has up to four decimal places.

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

Argument 1

String

Determines whether a string can be interpreted as a number. If it can, returns "True", otherwise returns "False."

@numeric

Argument 1

String

Converts a string to a number.

@left

Argument 1

String

Argument 2

Number of characters

Extracts n characters from the left side of the string.

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 n characters from the right side of the string.

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

Argument 1

String

Argument 2

Number: Starting position

Argument 3

Number of characters

Extracts a substring from a string. The starting position begins at 1.

@trim
(fusion_place >= 10.0)

Argument 1

String

Returns the string with leading and trailing spaces removed.

@len

Argument 1

String

Returns the length of the string.

@text

Argument 1

Number

Argument 2

Number: Format pattern

[Argument 3]

Number: Decimal places

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, 0 keeps the original value, 1 rounds to the nearest ten, 3 rounds to the nearest thousand, and so on (if omitted, it is treated as 0).

@repeat

Argument 1

String

Argument 2

Number: Number of repetitions

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
(fusion_place >= 10.0)

Argument 1

String: Search string

Argument 2

String: Target string

[Argument 3]

Number: Starting position

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 #VALUE! is returned.

@substitute

Argument 1

String

Argument 2

String: String to replace

Argument 3

String: Replacement string

Replaces all occurrences of a specific substring in a string.

@split

Argument 1

String

Argument 2

String: Delimiter

Argument 3

Number: Index

Returns the part of the string corresponding to the index after splitting it with the delimiter. The index starts from 1.

@num_of_chars_of_type

Argument 1

Number: Integer representing character type

Argument 2

String: Target string

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:

1

Numeric

2

Uppercase letter

4

Lowercase letter

8

Whitespace

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 [PRO_CD] contains only alphanumeric characters, use the following:

  @num_of_chars_of_type(1+2+4, [PRO_CD].Text)=@len([PRO_CD].Text)

@num_of_listed_chars

Argument 1

String: String listing the target characters

Argument 2

String: Target string

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 - and + in the string value of the cell specified by [PRO_CD], use the following:

  @num_of_listed_chars( "-+", [PRO_CD].Text)

@asc
(fusion_place >= 12.0)

Argument 1

String: String to convert

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:

  @asc( [PRO_CD].Text)

@jis
(fusion_place >= 12.0)

Argument 1

String: String to convert

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:

  @jis( [PRO_CD].Text)

Date Calculation Functions

Function Arguments
(Optional arguments are enclosed in [])
Functionality

@date

Argument 1

String or Number: Year

Argument 2

String or Number: Month

Argument 3

String or Number: Day

[Argument 4]

String or Number: Month offset

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., 2020) or a string (e.g., "2020") for the function’s arguments.

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):

  @date(2020,4,1,3)

In a March fiscal year, the fiscal year end is offset by 3 months, so the month offset is 3.

Example) The date serial number for April 1, 2021, in a June fiscal year (which corresponds to 2020/10/1):

  @date(2020,4,1,-6)

In a June fiscal year, the fiscal year end is offset by -6 months, so the month offset is -6.

If the month offset is not specified, it is considered to be 0.

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 #VALUE is returned.


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

Argument 1

Number: Date serial number

Returns the year corresponding to the date serial number.

@month

Argument 1

Number: Date serial number

Returns the month corresponding to the date serial number.

@day

Argument 1

Number: Date serial number

Returns the day within the month corresponding to the date serial number.

@day_of_week

Argument 1

Number: Date serial number

Returns the day of the week corresponding to the date serial number.

1

Monday

2

Tuesday

3

Wednesday

4

Thursday

5

Friday

6

Saturday

7

Sunday

@last_day_of_month

Argument 1

Number: Date serial number

Returns the date serial number for the last day of the month corresponding to the date serial number (considers leap years).

@week_anchor

Argument 1

Number: Start date of the base period (date serial number)

Argument 2

Number: First day of the week (Monday: 1, Sunday: 7)

[Argument 3]

Number: Day to determine the base period for the week (same as above)

Returns the date serial number for the start of the first week when the period starting from the base date is divided into weeks.

Base period start date

Specifies the first day of the period (e.g., year, month, etc.) to be divided into weeks.

First day of the week

Specifies the day on which the week should start.

Day to determine the base period for the week

Specifies the first week as the week containing this day. If not specified, the first week is considered to be the one containing the base period start date.

@week_num

Argument 1

Number: Start date of the week series (date serial number)

Argument 2

Number: Target date to check (date serial number)

[Argument 3]

Number: Next week series start date (date serial number)

Returns the number of the week containing the target date, based on the week series starting from the start date.
The first week’s number is 1.

If "next week series start date" is specified, any date on or after that date is considered to belong to the next series, and 0 is returned.

Logical Functions

Function Arguments
(Optional arguments are enclosed in [])
Functionality

@is_error
(fusion_place >= 10.0)

Argument 1

Any value

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

Argument 1

Any value

Argument 2

Value when an error occurs

If Argument 1 is an error value, returns Argument 2. Otherwise, returns Argument 1.

Example:

  @iferror([A]/[B], "-")

In this example, if the value of [B] (i.e., [B].total) is zero and division by zero occurs, it returns -.

Error values include numeric errors like #DIV!/0, #VALUE, and also values of cells that are read-protected such as #N/A.

⚠ 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
(fusion_place >= 12.1)

(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 0).

Skipped members in the member selection expression are also considered in the depth calculation.

@height
(fusion_place >= 12.1)

(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 0). The height of members other than the lowest is calculated as the maximum height of the child members + 1.

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

Argument 1

Dimension Object or String

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 0). If there is no current member for the dimension, or if it is not supplied from the member list, it returns 0.

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

Argument 1

Dimension Object or String

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 0). If there is no current member for the dimension, or if it is not supplied from the member list, it returns 0.

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.

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

[Argument 1]

Number: Field number

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 @field_key specifies which key to return (starting from 1).

If omitted, it is considered that 1 was specified.

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.