如何在 icCube 中检查 MDX 度量的数据类型?

how can you check the data type of a MDX Measure in icCube?

我在聚合数据的 STATS 维度中使用项目最新计算成员。但我也在使用字符串度量(例如显示一些文本)。

现在,字符串度量在使用 PTD 视图时显示错误: "Aggregation SUM is not supported for datatype string".

解决方案是在聚合之前检查数据类型,但您该怎么做。

在 SSAS MDX 中,有一个名为 "typename()" 的 VBA 函数,icCube 也有吗?

自 icCube 6.5.1 起,以下 MDX 函数可用:

VarTypeName   ( arg ) : the type of the MDX argument
ValueTypeName ( arg ) : the type of the MDX argument when evaluated

例如:

VarTypeName   ( [Measures].[Amount] ) : "measure" 
ValueTypeName ( [Measures].[Amount] ) : "double"

希望对您有所帮助。