无涯教程-JavaScript - CUBEMEMBERPROPERTY函数

43 阅读1分钟

描述

CUBEMEMBERPROPERTY函数从多维数据集返回成员属性的值。使用此函数可以验证多维数据集中是否存在成员名称,并返回该成员的指定属性。

语法

CUBEMEMBERPROPERTY (connection, member_expression, property)

争论

Argument 描述 Required/Optional
connection Name of the connection to the cube. - A text string Required
member_expression A multidimensional expression (MDX) of a member within the cube. - A text string Required
property The name of the property returned or a reference to a cell that contains the name of the property. - A text string Required

Notes

  • 对CUBEMEMBERPROPERTY函数求值时,它将在检索所有数据之前在单元格中临时显示"#GETTING_DATA…"消息。

  • 如果连接名称不是工作簿中存储的有效工作簿连接,则CUBEMEMBERPROPERTY返回一个#NAME?错误值。如果联机分析处理(OLAP)服务器未运行,不可用或返回错误消息,则CUBEMEMBERPROPERTY返回一个#NAME吗?错误值。

  • 如果member_expression语法不正确,或者多维数据集中不存在member_expression指定的成员,则CUBEMEMBERPROPERTY返回错误值#N/A。

  • 共享连接时,如果您在数据透视表中引用基于会话的对象(如计算所得成员或命名集),则
  • CUBEMEMBERPROPERTY可能会返回#N/A错误值。数据透视表被删除,或者您可以将数据透视表转换为公式。 (在"options"options卡上的"工具"组中,单击" OLAP工具",然后单击"转换为公式"。)

适用性

Excel 2007,Excel 2010,Excel 2013,Excel 2016

Example

=CUBEMEMBERPROPERTY ("Sales","[Time].[Fiscal].[2004]",$A$3)
=CUBEMEMBERPROPERTY("Sales","[Store].[MyFavoriteStore]","[Store].[Store Name].[Store Sqft]")

参考链接

www.learnfk.com/javascript/…