ad

数据集函数Part1 概述(2)-英雄云拓展知识分享

匿名投稿 206 2024-01-30

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 数据集的“销售成因”维度返回了一个“促销”成员。

数据集函数Part1 概述(2)-英雄云拓展知识分享

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 ,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财政年度自行车的销售毛利的汇总金额,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函数相比,有个很大的不同点——当它们作为其他数据集函数的参数时,有不同的行动表现。

Functions that are not CUBE functions return a value which is displayed in the Excel spreadsheet cell. For example, the result of a SUM function will be a number that is displayed in the cell.
非数据集函数返回值直接显示在Excel中。举例来看,SUM函数会显示一个数值在单元格中。

CUBE functions (except for CUBESETCOUNT) return a result which is more complex than this. CUBE functions return two distinct values. One is the value that is displayed in the cell. But there is also a second hidden value which can be thought of as an MDX expression (MDX is the Multi-Dimensional eXpression language used by SQL Server Analysis Services) defining the result. When one CUBE function uses another CUBE function as its argument, the argument takes on the MDX value rather than the display value.
数据集函数(除CUBESETCOUNT 外)的返回值要复杂许多。除一个值显示在单元格中,还有第2个隐藏值,可以看做是MDX表达式(SQL Server Analysis Services使用的多维表达式语言)的结果。当一个数据聚集函数使用另外一个数据集函数作为参数时,该参数取MDX值,而不是显示值。

Here’s an illustration that I hope will help to make this clearer. Here is the asymmetric report that we looked at earlier.
我希望经过一个例子来更清楚地说明这个概念。还是刚才我们看到的那个例子。

 

Cell C2 actually contains two separate values. The first is the display value that you see in the cell, namely “On Promotion”. But when the formula in cell C3 uses cell C2 as an argument, the value that it obtains from cell C2 is actually “[Sales Reason].[Sales Reasons].[Sales Reason].&[2]” which is the MDX unique name for the “On Promotion” member. You can find this hidden value behind the CUBE function using Excel’s object model by selecting cell C2 and then typing “?Activecell.MDX” into the immediate window in the Visual Basic Editor.
单元格C2实际包括两个不同的值。第一个显示在单元格中——“促销”。单元格C3使用了C2为参数,而其所使用的值实际上是“[Sales Reason].[Sales Reasons].[Sales Reason].&[2]” ,是MDX返回的该“促销”成员的唯一值。您可使用Excel对象模式选择C2单元格,然后在VBE立即窗口输入“?Activecell.MDX”,找到藏在数据集函数中的隐藏值。

And that’s the overview. In my next post, I will provide some examples that illustrate how to use these functions in your reports.
以上是数据集函数的概述。下篇帖子,我将用些示例来讲明怎样在报表中使用这些函数。

Published Thursday, February 02, 2006 8:59 PM by David Gainer
Filed Under: Formulas and functions, Analysis Services


选择英雄云云表单=选择更智能的Excel

在现代企业管理中,数据的高效管理和处理至关重要。随着信息技术的不断发展,英雄云云表单已经成为了提高数据录入、管理和分析效率的不可或缺的工具。让我们来深入探讨英雄云-云表单的几大优势。

基础字段:多样性满足业务需求

英雄云云表单中包括了各种基础字段,如单行文本多行文本数字输入框单选框复选框下拉下拉复选框日期时间分割线等。这些字段的多样性使用户可以根据具体的业务需求,轻松进行文本、数据和时间信息的录入或修改。例如,您可以使用单行文本字段录入员工姓名、产品型号等,或者使用下拉框进行多选,根据不同情况选择更加方便的字段类型。

高级字段:提升工作效率

英雄云云表单还提供了高级字段,如地址图片附件手写签名手机子表关联数据关联查询以及流水号。这些高级字段在基础字段的基础上升级,可帮助用户完成一些琐碎的工作。例如,使用地址字段可以避免逐字打字,而流水号字段可以自动生成规律性的编号,非常适用于合同编号生成等场景。

部门成员字段:精确管理与通讯录的关联

英雄云的部门成员字段允许企业对各个部门的成员进行精确管理。用户可以通过部门成员字段获取通讯录中的部门成员信息,应用于记录报销人、报销部门等场景。这些成员字段还细分为成员单选成员多选,可根据具体需求在通讯录中选择一个或多个成员。

聚合表:数据处理更智能

英雄云聚合表功能用于对已存在的表单数据进行聚合计算,从而得到一张聚合表,后续其他表单可调用聚合表进行数据联动、关联查询和关联数据等操作完成数据处理。这一功能可应用于多种场景,如进销存管理、财务管理和门店零售管理等,帮助企业完成数据处理,提高工作效率。

表单权限设置:灵活管理数据访问

英雄云的表单权限设置允许用户根据企业的具体需求管理表单的访问和操作权限。用户可以根据系统权限或自定义权限对不同成员或团队进行权限设置,以确保数据的安全和合规性。这一功能使企业能够根据变化的业务需求和团队结构,实时调整权限设置。

自定义打印模板:文档输出更便捷

英雄云云表单支持自定义打印模板,可将表单数据转换为可打印的Word文档。用户可以根据自己的需求进行排版和编辑,将产品规格说明书等文档轻松生成。这一功能提供了一种标准化的文档输出方式,简化了信息整理的过程。

综合来看,选择英雄云云表单意味着选择更智能、更灵活、更高效的数据管理工具。无论是提高工作效率,精确管理数据,还是实现数据处理,英雄云云表单都能满足您的多样化需求,助力您的业务发展。

如果您正在寻找一款强大的云表单工具,不妨考虑英雄云,它将为您带来更多的便捷和智能,助您事半功倍。


免责声明:

本网址(www.yingxiongyun.com)发布的材料主要源于独立创作和网友匿名投稿。此处提供的所有信息仅供参考之用。我们致力于提供准确且可信的信息,但不对材料的完整性或真实性作出任何保证。用户应自行验证相关信息的正确性,并对其决策承担全部责任。对于由于信息的错误、不准确或遗漏所造成的任何损失,本网址不承担任何法律责任。本网站所展示的所有内容,如文字、图像、标志、音频、视频、软件和程序等的版权均属于原创作者。如果任何组织或个人认为网站内容可能侵犯其知识产权,或包含不准确之处,请即刻联系我们进行相应处理。

上一篇:合并单元格的同时保存所有数值-英雄云拓展知识分享
下一篇:美丽的Excel数据区域-英雄云拓展知识分享
相关文章

 发表评论

暂时没有评论,来抢沙发吧~

×