http://www.pptjcw.com

xcel表格制作教程入门:数据集函数Part1 概述(二)

    What are the new CUBE functions?

    新增的数据集函数是什么?

    We have implemented seven new CUBE functions that can be used in Excel formulas just like any other function in Excel. These functions permit Excel to fetch data from SQL Server Analysis Services (2000 & 2005), including any member, set, aggregated value, property, or KPI (Key Performance Indicator) from the OLAP cube. This data can then be placed anywhere in the spreadsheet, intermingled with other local calculations and/or within other formulas. Here are the seven new CUBE functions:
    我们补充了7个新数据集函数,同其它工作表函数一样,可以在Excel公式中使用。这些函数允许Excel从 SQL Server Analysis Services (2000 & 2005) 提取数据,包括任意成员、子集、汇总值、属性或KPI(关键业绩指标)。这些数据可以放在电子表格的任何地方参与本地计算,或者作为其他公式的一部份参与计算。

    CUBEMEMBER (connection, member_expression,)
    This function will fetch the member or tuple defined by the member_expression. For example, (from the illustration above,) the formula: =CUBEMEMBER (“Adventure Works”, “[Sales Reason].[On Promotion]”) returns the member named “On Promotion” from the “Sales Reason” dimension of the Adventure Works cube.

    该函数通过定义member_expression(成员表达式)提取成员或成员组。例如,上个实例的公式=CUBEMEMBER (“Adventure Works”, “[Sales Reason].[On Promotion]”), 从Adventure Works 数据集的“销售成因”维度返回了一个“促销”成员。

    CUBEVALUE (connection, [member_expression_1], [member_expression_2], …)
    This function will fetch the aggregated value from the cube filtered by the various member_expression arguments. For example, the formula: =CUBEVALUE (“Adventure Works”,”[Measures].[Gross Profit]”,”[Product].[Category].[Bikes]”,”[Date].[Fiscal Year].[FY 2004]”) returns the value $5,035,271.22 which is the aggregated amount in the Adventure Works cube for Gross Profit for Bikes in Fiscal 2004.

    该函数对数据集按member_expression(成员表达式)参数变量汇总,返回汇总数。例如,公式=CUBEVALUE (“Adventure Works”,”[Measures].[Gross Profit]”,”[Product].[Category].[Bikes]”,”[Date].[Fiscal Year].[FY 2004]”) ,返回Adventure Works数据集中2004财政年度自行车的销售毛利的汇总金额$5,035,271.22

    CUBESET (connection, set_expression, , [sort_order], [sort_by])
    This function will fetch the set that is defined by the set_expression parameter. Optional parameters allow you to specify the ordering of the set as well as the caption to be displayed in the Excel cell that contains this formula. (Note that the set itself won’t have a display value. For example, the formula: =CUBESET (“Adventure Works”,”[Customer].[Customer Geography].[All Customers].children”,”Countries”) returns the set of countries in the Customer Geography hierarchy and shows “Countries” as the cell’s display value.

    该函数通过set_expression(子集表达式)参数的定义提取子集。选项参数Caption可用来自定义一个子集的标题,显示在包含该公式的单元格中。(注意子集本身并不显示值) 例如,公式=CUBESET (“Adventure Works”,”[Customer].[Customer Geography].[All Customers].children”,”Countries”)分级返回Customer Geography的国家名子集,并显示“国家”作为单元格的值。

    CUBESETCOUNT (set)
    This function returns the number of items in a set. Typically the argument to this
    function will be a CUBESET function or a reference to a CUBESET function.

    该函数返回一个子集的记录数,其参数是一个数据子集函数或子集函数所在单元格的引用。

    CUBERANKEDMEMBER (connection, set_expression, rank, )
    This function returns the Nth item from a set. This can be very useful when building a Top N (or Bottom N) report in Excel.

    该函数返回子集的前N名的记录。当用Excel建立一个前N或后N名的报告时,它会很有用。

    CUBEMEMBERPROPERTY (connection, member_expression, property)
    This function returns a property of a member in the OLAP cube.

    该函数返回OLAP数据集中某个成员的属性。

    CUBEKPIMEMBER (connection, kpi_name, kpi_property, )
    This function returns a KPI (Key Performance Indicator) from the OLAP cube.

    该函数从OLAP数据集返回一个KPI(关键业绩指标)

    CUBE functions provide MDX to other CUBE functions
    There is one way in which the CUBE functions are significantly different from any other Excel functions. This is in the way that they behave when they are passed in as arguments to other CUBE functions.

    数据集函数与其他Excel函数相比,有个很大的不同点——当它们作为其他数据集函数的参数时,有不同的行为表现。

    提示:如果您觉得本文不错,请点击分享给您的好友!谢谢

    上一篇:表格制作快速入门:[数据透视表]重复显示项目标签 下一篇:excel怎么做表格:自动筛选的改进(二)

    郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。