在MDX中舍入计算的度量

时间:2010-06-04 12:11:40

标签: rounding mdx ssas

如果不在服务器上安装Excel,我如何将计算出的mdx测量值舍入到最接近的整数? Excel函数是CEILING(number, significance),但无法在生产ssas-server上安装Excel。

2 个答案:

答案 0 :(得分:6)

如果这是Microsoft的情况,您可以使用MDX中的任何VBA函数来摆弄字符串或数字。所以Round(xxxxxx, 2)会起作用。

答案 1 :(得分:0)

对于Floor函数,请尝试使用Int函数,例如:

Int([Measures].[Store Sales])

对于Ceiling功能,请尝试Int + 1

IIF(([Measures].[Store Sales]) - Int([Measures].[Store Sales]) = 0, [Measures].[Store Sales], Int([Measures].[Store Sales]) + 1)
相关问题