@ABS
@ABS
The absolutevalue of a number is that number less its sign. A negative number becomespositive, while a positive number remains positive.
【返回表达式的绝对值。数字的绝对值是指数字去掉它的正负号。负数变成正数,正数依然是正数。】
Syntax
@ABS (expression)
Parameter |
Description |
Expression【表达式】 |
Member name or mathematical expression that generates a numeric value. 【成员名称或者产生数值的数学表达式】 |
Example
The following example is based on the DemoBasic database. In this example, Variance needs to be presented as a positivenumber. The @ABS function is used because otherwise some combinations of Actual- Budget would return negative values.
【下面的例子建立在Demo Basic 数据库上。在例子中,变化需要作为一个正数呈现。@ABS函数被使用,因为一些“Actual – Buget”组合会返回负值。】
Variance=@ABS(Actual-Budget);
This exampleproduces the following report:
Sales VCR San_Francisco
Jan Feb Mar
=== === ===
Actual 1,323 1,290 1,234
Budget 1,200 1,100 1,100
Variance 123 190 134