Calculation Functions--Mathematical Functions--@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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章