全部文档
文档中心财务模型多维表达式MDXMDX函数计算函数ABS函数

ABS函数

返回指定数值的绝对值。

ABS(Number)  

Number -> 数据类型:Number 一个数值或返回类型为数值的函数。

返回值数据类型: Number

ABS函数用于计算公式中,返回指定数值的绝对值。

如下例子表达的计算是,计算科目成员Amount1与Amount2的差值的绝对值,并赋值到科目成员Amount_Diff上:

Scope([Scenario].[Budget], [Version].[V1], [Year].[2022],Base([Period].[TotalPeriod]));
    [Account].[Amount_Diff] = ABS([Account].[Amount1]-[Account].[Amount2]);
End Scope;

ABS函数的入参是数值类型,因此可以和其他计算公式组合使用。

Scope([Scenario].[Budget], [Version].[V1], [Year].[2022],Base([Period].[TotalPeriod]));
    [Account].[Amount_Diff] = ABS(SUM(Base([Account].[Amount1]))-[Account].[Amount2]) + [Account].[Amount3];
End Scope;

回到顶部

咨询热线

400-821-9199

我们使用 ChatGPT,基于文档中心的内容以及对话上下文回答您的问题。

ctrl+Enter to send