참조: 계산에 대한 연산자 및 함수
구문 규칙
- 계정, 계산, 커스텀 메트릭. 필수입니다. 표현식에 계정 코드(이름 아님) 또는 계산 코드를 사용합니다.
- 괄호로 묶어야 합니다. E예:[1000_Assets]또는[My_Quick_Ratio].
- 버전. (옵션) 다음 구문을 사용합니다.[code](version = [version name])인스턴스에 정의된 계정, 계산 또는 커스텀 메트릭의 버전을 참조하려는 경우 예를 들어 다음과 같습니다.[headcount_FTE](version = [Forecast 2018])-Headcount_FTE는 계정이고Forecast 2018은버전입니다. 아무것도 지정되지 않은 경우 기본 버전이 사용됩니다.버전 및 순서 우선순위에 대한 자세한 내용은개념: 차트의 계산을참조하십시오.
- 괄호로 묶어야 합니다.
- 버전명에 공백이 있는 경우 괄호가 필요합니다. 예를 들어,Working Budget은 괄호로 묶어야 하지만,WorkingBudget에는 괄호가 필요하지 않습니다.
- 연산자 우선순위: 왼쪽에서 오른쪽으로 평가하거나 묶습니다.d괄호 안의 값을 먼저 계산합니다.
수학 연산자
Operator | Description | Syntax |
|---|---|---|
+ | Adds two values. | [metric1] +
[metric2] |
- | Subtracts two values. | [metric1] -
[metric2] |
/ | Divides two values. | [metric1] /
[metric2] |
* | Multiplies two values. | [metric1] *
[metric2] |
% | Calculates the remainder (modulus) when dividing two
values. | [metric1] %
[metric2] |
^ | Raises the value on the left to the power of the value on the
right. For example, 5^ 2 = 25. | [metric1]
^2 |
비교 연산자
비교 연산자를 iif 함수와 함께 사용합니다. E예:
iif([30_Net_Income] <= ([41_laptopRev] + [42_desktopRev] + [43_tabletRev]), [30_Net_Income], 40_Product_Revenue])
.Operator | Description | Syntax |
|---|---|---|
= | Checks if two values are equal. | [metric1] =
[metric2] |
<> | Checks if two values are not equal. | [metric1] <>
[metric2] |
< | Checks if the left value is less than the right value. | [metric1] <
[metric2] |
<= | Checks if the left value is less than or equal to the right
value. | [metric1] <=
[metric2] |
> | Checks if the left value is greater than the right value. | [metric1] >
[metric2] |
>= | Checks if the left value is greater than or equal to the right
value. | [metric1] >=
[metric2] |
BETWEEN | Checks if a value is between two other values. Minimum and
maximum values are included in the range. Use with the
AND operator. | [metric1] BETWEEN 0
AND [metric2] |
NOT BETWEEN | Checks if a value is not between the two other values. Minimum
and maximum values are included in the range. Use with the
AND operator. | [metric1] NOT BETWEEN
0 AND [metric2] |
AND | Compares two expressions and returns true if both expressions are
true. | ([metric1] >=
[metric2]) AND ([metric1] >= [metric3]) |
OR | Compares two expressions and returns true if either expression is
true. | ([metric1] >=
[metric2]) OR ([metric1] >= [metric3]) |
비교 함수
함수 | 설명 | 예: |
|---|---|---|
iif( 비교 , true 표현식 , false 표현식 ) | 비교 표현식을 평가합니다. true인 경우, true 표현식 을 반환합니다. 그렇지 않은 경우 false 표현식 을 반환합니다. | iif([metric1] > 10 AND [metric1] < 20, [metric2], [metric3]) |
계산 함수
Function | Description | Example |
|---|---|---|
min( expression ,
expression ) | Returns the smallest value of two expressions. | min([metric1],
[metric2]) |
max( expression ,
expression ) | Returns the largest value of two expressions. | max([metric1],
[metric2]) |
sin( expression ) | Returns the sine of a metric or expression. Used in
Trigonometry. | sin([metric1]) |
cos( expression ) | Returns the cosine of a metric or expression. Used in
Trigonometry. | cos([metric1]) |
tan( expression ) | Returns the tangent of a metric or expression. Used in
Trigonometry. | tan([metric1]) |
abs( expression ) | Returns the absolute value of a metric or expression. Use to
convert negative numbers to positive numbers. | abs([metric1]) |
sqrt( expression ) | Returns the square root of a metric or expression. | sqrt([metric1]) |
round( expression ) | Rounds a numeric value to the nearest whole number. The
mid-point is rounded up. Examples:
| round([metric1]) |
round( expression ,
digits ) | Rounds a numeric value to a specified number of digits.
Positive digits round to the specified number
of decimal places. Negative digits round to
the nearest multiple of 10. Examples:
| round([metric1],
1) |
floor( expression ) | Returns a numeric value rounded down towards zero.
Examples:
| floor([metric1],
2) |
floor( expression ,
expression ) | Returns a numeric value rounded down towards zero, to the
nearest multiple of significance. Examples:
| floor([metric1],
2) |
ceiling( expression ) | Returns number rounded up away from zero. Examples:
| ceiling([metric1]) |
ceiling( expression ,
expression ) | Returns number rounded up, away from zero, to the nearest
multiple of significance. Examples:
| ceiling([metric1],
2) |
검증 함수
함수 | 설명 | 예: |
|---|---|---|
isnull( 표현식 , null 표현식 ) | 표현식 이 null인지 확인합니다. true인 경우, null 표현식 을 반환합니다. 그렇지 않으면표현식을 반환합니다. 값. | isnull([metric1], [metric2]) |
isinfinity( 표현식 , infinity 표현식 ) | 표현식 이 infinity(나누기d x 0) true인 경우,infinity 표현식을 반환합니다.값. 그렇지 않은 경우 표현식 값을 반환합니다. | isinfinity([metric1], [metric2]) |
isnan( 표현식 , NaN 표현식 ) | 표현식이 NaN인지 확인합니다(0으로 나뉘는 0). true인 경우NaN 표현식을 반환합니다.값 그렇지 않으면표현식을 반환합니다.값 | isnan([metric1], [metric2]) |
isnrn( 표현식 , NrN 표현식 ) | 표현식 이 infinity, NaN 또는 null과 같이 실수인지 확인합니다. true인 경우 반환다음 NrN 표현식 값 그렇지 않으면표현식을 반환합니다. 값. | isnan([metric1], [metric2]) |