Dimensional Functions A-C D-G H-L M-Q R-Z Advanced Advanced Advanced Advanced Advanced _format ( expression , format_keyword  ) Associates a format with the expression. The format_keyword can be PERCENTAGE_0, PERCENTAGE_1, or PERCENTAGE_2. PERCENTAGE_1 returns a percentage with one digit to the right of the decimal point, PERCENTAGE_2 returns a percentage with two digits to the right of the decimal point, and PERCENTAGE_3 returns a percentage value out of one with three digits to the right of the decimal point (for example, 0.965). Example: _format ( [Unit Sale Price] / [Unit Price] , PERCENTAGE_2 ) Result: 75.12% ancestor ( member, level|integer ) Returns the ancestor of "member" at "level" or at "integer" number of levels above "member". Note: The result is not guaranteed to be consistent when there is more than one such ancestor. Example: ancestor ( [TrailChef Water Bag] , 1 ) Result: Cooking Gear Example: ancestor ( [TrailChef Water Bag] , 2 ) Result: Camping Equipment Example: ancestor ( [TrailChef Water Bag] , [great_outdoors_company].[Products].[Products].[Product type] ) Result: Cooking Gear caption ( level|member|set_expression ) Returns the caption values of "level", "member", or "set_expression". The caption is the string display name for an element and does not necessarily match the unique identifier used to generate the business key or member unique name (MUN) for the element. The caption is not necessarily unique; for example, the caption for a month may return the month name without further year details to make the value unique. Example: caption ( [TrailChef Water Bag] ) Result: TrailChef Water Bag Example: caption ( [great_outdoors_company].[Products].[Products].[Product line] ) Result: Returns the caption values of the Product line set. Camping Equipment Mountaineering Equipment Personal Accessories Outdoor Protection Golf Equipment children ( member ) Returns the set of children of a specified member. Example: children ( [Camping Equipment] ) Result: Returns the set of children for Camping Equipment. Cooking Gear Tents Sleeping Bags Packs Lanterns closingPeriod ( level [ , member ] ) Returns the last sibling member among the descendants of a member at "level". This function is typically used with a time dimension. Example: closingPeriod ( [great_outdoors_company].[Years].[Years].[Month] ) Result: 2006/Dec Example: closingPeriod ( [great_outdoors_company].[Years].[Years].[Year] ) Result: 2006 Example: closingPeriod ( [great_outdoors_company].[Years].[Years].[Month] , [2006 Q 4] ) Result: 2006/Dec completeTuple ( member { , member } ) Identifies a cell location (intersection) based on the specified members, each of which must be from a different dimension. However, completeTuple () implicitly includes the default member from all dimensions not otherwise specified in the arguments, rather than the current member. CompleteTuple will use the default measure rather than the currentMeasure in the query if the measure is not defined in the completetuple function. This function appears in the Planned Headcount sample report in the GO Data Warehouse (analysis) package. Example: completeTuple ( [Mountaineering Equipment] , [Fax] ) Result: The completeTuple does not pick up the currentMember by default as the tuple function does. The values in the first column are identical across each year because the default member of the Years dimension, the root member, is used rather than the current member. Likewise, the first column displays Revenue rather than Quantity Sold because the Revenue measure is the default from the Measures dimension. CompleteTuple will use the default measure rather than the currentMeasure in the query if the measure is not defined in the completetuple function. Qty Sold Mountaineering Sales by Fax -------- -------------- 2004 $1,220,329.38 2005 $1,220,329.38 2006 $1,220,329.38 Example: completeTuple ( [Mountaineering Equipment] , [Fax] , [Quantity sold] , currentMember ( [great_outdoors_company].[Years].[Years] ) ) Result: The completeTuple function uses the currentMember of the Years dimension and the Quantity sold measure. Qty Sold Mountaineering Sales by Fax ----------- ------------------------------------------ 2004 0 2005 8,746 2006 7,860 unique ( set_expression ) Removes all duplicates from "set_expression". The remaining members retain their original order. openingPeriod ( level [ , member ] ) Returns the first sibling member among the descendants of a member at "level". This function is typically used with a time dimension. Example: openingPeriod ( [great_outdoors_company].[Years].[Years].[Month] ) Result: 2004/Jan Example: openingPeriod ( [great_outdoors_company].[Years].[Years].[Year] ) Result: 2004 Example: openingPeriod ( [great_outdoors_company].[Years].[Years].[Month] , [2006 Q 4] ) Result: 2006/Oct parallelPeriod ( level [ , integer_expression [ , member ] ] ) Returns a member from a prior period in the same relative position as "member". This function is similar to the cousin function, but is more closely related to time series. It takes the ancestor of "member" at "level" (called "ancestor") and the sibling of "ancestor" that lags by "integer_expression" positions, and returns the parallel period of "member" among the descendants of that sibling. When unspecified, "integer_expression" defaults to 1 and "member" defaults to the current member. Example: parallelPeriod ( [great_outdoors_company].[Years].[Years].[Quarter] , -1 , [2006/Aug] ) Result: 2006/Nov Example: parallelPeriod ( [great_outdoors_company].[Years].[Years].[Quarter] , 1 , [2006/Aug] ) Result: 2006/May Example: parallelPeriod ( [great_outdoors_company].[Years].[Years].[Year] , 2 , [2006/Aug] ) Result: 2004/Aug cousin ( member1 , member2 ) Returns the child member of "member2" with the same relative position as "member1" to its parent. This function appears in the Revenue by GO Subsidiary 2005 sample report in the GO Data Warehouse (analysis) package. Example: cousin ( [Irons] , [Camping Equipment] ) Result: Cooking Gear Example: cousin ( [Putters] , [Camping Equipment] ) Result: Sleeping Bags crossjoin ( set_expression1 , set_expression2 ) Returns the cross product of "set_expression1" and "set_expression2". currentMember ( hierarchy ) Returns the current member of the hierarchy during an iteration. If "hierarchy" is not present in the context in which the expression is being evaluated, its default member is assumed. This function appears in the Rolling and Moving Averages interactive sample report. defaultMember ( hierarchy ) Returns the default member of "hierarchy". Example: defaultMember ( [great_outdoors_company].[Products].[Products] ) Result: Products Example: defaultMember ( [great_outdoors_company].[Years].[Years] ) Result: Year Example: defaultMember ( hierarchy ( [great_outdoors_company].[Measures].[Quantity sold] ) ) Result: Revenue emptySet ( hierarchy ) Returns an empty member set for "hierarchy". This is most often used as a placeholder during development or with dynamic report design (either with the IBM® Cognos® Software Development Kit or via report design). By creating a data item that contains the emptyset function, it is possible to build complex expressions that can later be revised by redefining the emptyset data item. Example: except ( [great_outdoors_company].[Products].[Products].[Product line] , emptySet ( [great_outdoors_company].[Products].[Products] ) ) Result: Returns the Product line set and an empty set for the Products set. Camping Equipment Golf Equipment Mountaineering Equipment Outdoor Protection Personal Accessories firstChild ( member ) Returns the first child of "member". Example: firstChild ( [By Product Lines] ) Result: Camping Equipment Example: firstChild ( [Camping Equipment] ) Result: Cooking Gear firstSibling ( member ) Returns the first child of the parent of "member". Example: firstSibling ( [Outdoor Protection] ) Result: Camping Equipment Example: firstSibling ( [Camping Equipment] ) Result: Camping Equipment hierarchy ( level|member|set_expression ) Returns the hierarchy that contains "level", "member", or "set_expression". Example: hierarchy ( [Cooking Gear] ) Result: Returns every member in the hierarchy that contains Cooking Gear. Products Camping Equipment Cooking Gear TrailChef Water Bag TrailChef Canteen ... Mountain Man Extreme Mountain Man Deluxe Example: hierarchy ( [great_outdoors_company].[Products].[Products].[Product line] ) Result: Returns every member in the hierarchy that contains the Product line. Products Camping Equipment Cooking Gear TrailChef Water Bag TrailChef Canteen ... Mountain Man Extreme Mountain Man Deluxe isEmpty ( value_expression ) Returns true if "value_expression" is null; otherwise returns false. item ( set_expression , index ) Returns a member from the "index" location within "set_expression". The index into the set is zero based. Example: item ( children ( [Camping Equipment] ) , 2 ) Result: Sleeping Bags lag ( member , index_expression ) Returns the sibling member that is "index_expression" number of positions prior to "member". Example: lag ( [Tents] , 1 ) Result: Cooking Gear Example: lag ( [Tents] , -2 ) Result: Packs lastChild ( member ) Returns the last child of a specified member. Example: lastChild ( Cooking Gear ) Result: TrailChef Utensils Example: lastChild ( [By Product Line] ) Result: Golf Equipment lastSibling ( member ) Returns the last child of the parent of a specified member. Example: lastSibling ( [Camping Equipment] ) Result: Golf Equipment lead ( member , index_expression ) Returns the sibling member that is "index_expression" number of positions after "member". If "index_expression" is negative, returns the sibling member that is "index_expression" number of positions before "member". Example: lead ( [Outdoor Protection] , 1 ) Result: Personal Accessories Example: lead ( [Outdoor Protection] , -2 ) Result: Golf Equipment level ( member ) Returns the level of "member". Example: level ( [Golf Equipment] ) Result: Returns the members on the Golf Equipment level. Camping Equipment Mountaineering Equipment Personal Accessories Outdoor Protection Golf Equipment levels ( hierarchy , index ) Returns the level in "hierarchy" whose distance from the root is specified by "index". Example: levels ( [great_outdoors_company].[Products].[Products] , 2 ) Result: Returns the members two levels from the root Products hierarchy. Cooking Gear Sleeping Bags Packs Tents ... Irons Putters Woods Golf Accessories Example: levels ( [great_outdoors_company].[Products].[Products] , 1 ) Result: Returns the members one level from the root Products hierarchy. Camping Equipment Mountaineering Equipment Personal Accessories Outdoor Protection Golf Equipment linkMember ( member , level|hierarchy ) Returns the corresponding member in "level" or "hierarchy" (of the same dimension). For level-based hierarchies, a level must be specified as the second argument, and for parent-child hierarchies, a hierarchy must be specified. An exception is thrown when the second parameter does not resolve to a hierarchy of the member's dimension. Note that calculated members are not supported as the first argument. member ( value_expression [ , string1 [ , string2 [ , hierarchy ] ] ] ) Defines a member based on "value_expression" in "hierarchy". "String1" identifies the member created by this function. It must be unique in the query and different from any other member in the same hierarchy. "String2" is the caption of the member; if it is absent, the caption is empty. To ensure predictable results, it is recommended that you supply the "hierarchy". Note: All calculations used as grouping items whose sibling items are other calculations or member sets should be explicitly assigned to a hierarchy using this function. The results are not predictable otherwise. The only exception is where the calculation involves only members of the same hierarchy as the siblings. In this case, the calculation is assumed to belong to that hierarchy. Example: member ( total ( currentMeasure within set filter ( [great_outdoors_company].[Products].[Products].[Product name] , caption ( [great_outdoors_company].[Products].[Products].[Product name] ) starts with 'B' ) ) , 'BProducts' , 'B Products' , [great_outdoors_company].[Products].[Products] ) Result: Returns the quantity sold and revenue for all products that start with the letter B. members ( hierarchy|level ) Returns the set of members in "hierarchy" or "level". In the case of a hierarchy, the order of the members in the result is not guaranteed. If a predictable order is required, an explicit ordering function (such as hierarchize) must be used. Example: members ( [great_outdoors_company].[Years].[Years] ) Result: Returns the members in Years. Example: members ( [great_outdoors_company].[Products].[Products].[Product line] ) Result: Returns the members in Product line. nestedSet ( set_expression1 , set_expression2 ) This function is intended for use only by Analysis Studio Result: Returns the top two products by revenue for each product line. nextMember ( member ) Returns the next member in the "member" level. Example: nextMember ( [Outdoor Protection] ) Result: Golf Equipment ordinal ( level ) Returns the zero-based ordinal value (distance from the root level) of "level". Example: ordinal ( [great_outdoors_company].[Products].[Products].[Product line] ) Result: 1 Example: ordinal ( [great_outdoors_company].[Products].[Products].[Product type] ) Result: 2 parent ( member|measure ) Returns the member that is the parent of "member" or "measure". Example: parent ( [Cooking Gear] ) Result: Camping Equipment _addMemberToSet ( member_expression , set_expression , parent|null , sibling|null , position ) Caution: internal use only; do not add this function to reports. Returns a set. The function inserts "member_expression" into "set_expression" immediately BEFORE or AFTER sibling. Note that "member_expression" and "set_expression" have to be from the same dimension and hierarchy. "Parent" is the unique name of the parent of the calculated member (member_expression ) , or NULL. "Sibling" is the unique name of the member relative to which "member_expression" is positioned, or NULL. "Position" has a value of BEFORE or AFTER. If "position" is not specified, the default value is AFTER. prevMember ( member ) Returns the member that immediately precedes "member" in the same level. This function appears in the Sales Growth Year Over Year sample report in the GO Data Warehouse (analysis) package. Example: prevMember ( [Outdoor Protection] ) Result: Personal Accessories Example: prevMember ( [2005] ) Result: 2004 roleValue ( string [ , member|set_expression ] ) Returns the value of the attribute that is associated with the role whose name is specified by "string" within the specified context. "Member" or "set_expression" is optional only in a number of limited circumstances, where it can be derived from another context. Applications can be made portable across different data sources and models by accessing attributes by role rather than by query item ID. Intrinsic roles that are defined for members of all data source types include: '_businessKey', '_memberCaption', '_memberDescription', '_memberUniqueName'. For Online Analytical Processing(OLAP) sources only intrinsic roles can be accessed by objects that span multiple levels. For dimensionally-modeled relational (DMR) data sources, assignment of roles is the modeler's responsibility. Additional roles can be defined in Framework Manager for each level in a hierarchy. For example, a Product type level might have an attribute column called "Type Shipping Container", and the Product level might have the "Product Shipping Container" attribute. Each of these objects could be assigned a custom role called "Container" in Framework Manager. The property could then be referenced independently of the actual column name by using the roleValue function. Example: roleValue ( '_memberCaption' , [Sales].[Product].[Product].[Product line] -> [all].[1] ) Result: Camping Equipment Example: roleValue ( '_businessKey' , [great_outdoors_company].[Years].[Years].[Year] ) Result: Returns the value of the attribute that is associated with the business key role. ("2004-01-01","2004-12-31") ("2005-01-01","2005-12-31") ("2006-01-01","2006-12-31") Example: roleValue ( '_memberUniqueName' , [great_outdoors_company].[Years].[Years].[Year] ) Result: Returns the value of the attribute that is associated with the MUN role. [great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (Root)].[20040101-20041231] [great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (Root)].[20050101-20051231] [great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (Root)].[20060101-20061231] rootMember ( hierarchy ) Returns the root member of a single-root hierarchy. This function appears in the Promotion Success sample report in the GO Data Warehouse (analysis) package. rootMembers ( hierarchy ) Returns the root members of a hierarchy. Example: rootMembers ( [great_outdoors_company].[Years].[Years] ) Result: By Time value ( tuple ) Returns the value of the cell identified by "tuple". Note that the default member of the Measures dimension is the Default Measure. Example: value ( tuple ( [great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (Root)].[20040101-20041231] , [great_outdoors_company].[Measures].[Revenue] ) ) Result: $34,750,563.50 Example: value ( tuple ( [2004] , [Camping Equipment] , [Revenue] ) ) Result: $20,471,328.88 descendants ( member|set_expression , level|distance [ , { self|before|beforewithmember|after } ] ) Returns the set of descendants of "member" or "set_expression" at "level" (qualified name) or "distance" (integer 0..n) from the root. Multiple options may be specified (separated by a space) to determine which members are returned. self: Only the members at the specified level are included in the final set (this is the default behaviour in the absence of any options). before: If there are any intermediate levels between the member's level and the one specified, members from those levels are included. If the level specified is the same as the member upon which the function is applied, the member is included in the final set. beforewithmember: If there are any intermediate levels between the member's level and the one specified, members from those levels are included. The member upon which the function is applied is also included in the final set. after: If other levels exist after the specified level, members from those levels are included in the final set. This function appears in the Sales Commissions for Central Europe sample report in the GO Data Warehouse (analysis) package. Example: descendants ( [great_outdoors_company].[Products].[Products].[Products] , [great_outdoors_company].[Products].[Products].[Product type] ) Result: Returns the set of descendants of the Products set at the Product type level. Note: [great_outdoors_company].[Products].[Products].[Products] is the root member of the Products hierarchy. Cooking Gear Sleeping Bags Packs Tents ... Eyewear Knives Watches Example: descendants ( [great_outdoors_company].[Products].[Products].[Products] , 1 ) Result: Returns the set of descendants of the Products set at the first level. Camping Equipment Golf Equipment Mountaineering Equipment Outdoor Protection Personal Accessories Example: descendants ( [great_outdoors_company].[Products].[Products].[Products] , 3 , before ) Result: Returns the descendants of the Products set before the third level. Camping Equipment Cooking Gear Sleeping Bags Packs Tents ... Eyewear Knives Watches Example: descendants ( [great_outdoors_company].[Products].[Products].[Products] , 2 , self before ) Result: Returns the set of descendants of the Products set before and including the second level. Camping Equipment Cooking Gear Sleeping Bags Packs Tents ... Eyewear Knives Watches except ( set_expression1 , set_expression2 [ , all ] ) Returns the members of "set_expression1" that are not also in "set_expression2". Duplicates are retained only if the optional keyword "all" is supplied as the third argument. Example: except ( set ( [Camping Equipment] , [Mountaineering Equipment] ) , set ( [Camping Equipment] , [Golf Equipment] ) ) Result: Mountaineering Equipment filter ( set_expression , Boolean_expression ) Returns the set resulting from filtering a specified set based on the Boolean condition. Each member is included in the result if and only if the corresponding value of "Boolean_expression" is true. Example: filter ( [Product line] , [Gross margin] > .30 ) Result: Mountaineering Equipment intersect ( set_expression1 , set_expression2 [ , all ] ) Returns the intersection of "set_expression1" and "set_expression2". The result retains duplicates only when the optional keyword "all" is supplied as the third argument. Example: intersect ( set ( [Camping Equipment] , [Mountaineering Equipment] ) , set ( [Camping Equipment] , [Outdoor Protection] , ) , all ) Result: Camping Equipment lastPeriods ( integer_expression , member ) Returns the set of members from the same level that ends with "member". The number of members returned is the absolute value of "integer_expression". If "integer_expression" is negative, members following and including the specified member are returned. Typically used with a time dimension. This function appears in the Rolling and Moving Averages interactive sample report. Example: lastPeriods ( 2 , [2006 Q 4] ) Result: Returns the last two members from the level that ends with 2006 Q 4. 2006 Q 3 2006 Q 4 Example: lastPeriods ( -3 , [2006 Q 4] ) Result: Returns the last three members from the level that starts with 2006 Q 4. 2006 Q 4 2007 Q 1 2007 Q 2 periodsToDate ( level , member ) Returns a set of sibling members from the same level as "member", as constrained by "level". It locates the ancestor of "member" at "level" and returns that ancestor's descendants at the same level as "member" (up to and including "member"). Typically used with a time dimension. This function appears in the Rolling and Moving Averages interactive sample report. Example: periodsToDate ( [great_outdoors_company].[Years].[Years].[Year] , [2004/Mar] ) Result: Returns values for [2004/Jan], [2004/Feb], [2004/Mar] topCount ( set_expression , index_expression , numeric_expression ) Sorts a set according to the values of "numeric_expression" evaluated at each of the members of "set_expression" and returns the top "index_expression" members. Example: topCount ( [great_outdoors_company].[Products].[Products].[Product line] , 2 , [Revenue] ) Result: Returns the top two revenues for the Product line set. Prod line Revenue ----------- ---------- Camping $89,713,990.92 Personal $31,894,465.86 bottomCount ( set_expression , index_expression , numeric_expression ) Sorts a set according to the value of "numeric_expression" evaluated at each of the members of "set_expression" and returns the bottom "index_expression" members. Example: bottomCount ( [great_outdoors_company].[Products].[Products].[Product line] , 2 , [Revenue] ) Result: Returns the bottom two members of the set sorted by revenue. Prod line Revenue ----------- ----------- Camping $3,171,114.92 Personal $20,891,350.60 topPercent ( set_expression , percentage , numeric_expression2 ) Sorts the set specified in "set_expression" in descending order and returns the topmost elements from the sorted set whose cumulative percentage of the total is greater than or equal to "percentage". Example: topPercent ( set ( [Camping Equipment] , [Golf Equipment] , [Mountaineering Equipment] ) , 40 , [2006] ) Result: For the set of Camping Equipment, Golf Equipment, and Mountaineering Equipment, returns the members with the largest Gross profit whose total for the year 2006 is at least 40% of the overall total. bottomPercent ( set_expression , percentage , numeric_expression ) Sorts the set specified in "set_expression" in ascending order and returns the bottommost elements from the sorted set whose cumulative percentage of the total is greater than or equal to "percentage". Example: bottomPercent ( set ( [Camping Equipment] , [Golf Equipment] , [Mountaineering Equipment] ) , 40 , [2006] ) Result: For the set of Camping Equipment, Golf Equipment, and Mountaineering Equipment, returns the members with the smallest Gross profit whose total for the year 2006 is at least 40% of the overall total. topSum ( set_expression , value , numeric_expression2 ) Sorts the set specified in "set_expression" in descending order and returns the topmost elements from the sorted set whose cumulative total is greater than or equal to "value". Example: topSum ( children ( [Products] ) , 16000000 , tuple ( [2006] , [great_outdoors_company].[Measures].[Gross profit] ) ) Result: For the Product line members, returns the members with the largest Gross profit whose total for the year 2006 is at least $6,000,000. bottomSum ( set_expression , value , numeric_expression ) Sorts the set specified in "set_expression" in ascending order and returns the bottommost elements from the sorted set whose cumulative total is greater than or equal to "value". Example: bottomSum ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) , 6000000 , tuple ( [2006] , [great_outdoors_company].[Measures].[Gross profit] ) ) Result: For the Product line members, returns the members with the smallest Gross profit whose total for the year 2006 is at least $6,000,000. union ( set_expression1 , set_expression2 [ , all ] ) Returns data for "set_expression1" and "set_expression2". The result retains duplicates only when the optional keyword "all" is supplied as the third argument. Example: union ( set ( [Camping Equipment] , [Golf Equipment] ) , set ( [Golf Equipment] , [Mountaineering Equipment] ) ) Result: Returns data for both sets as one new set, showing the Golf Equipment column only once. Example: union ( set ( [Camping Equipment] , [Golf Equipment] ) , set ( [Golf Equipment] , [Mountaineering Equipment] ) , all ) Result: Returns data for both sets as one new set, showing the Golf Equipment column twice. ancestors ( member , level|index ) Returns all the ancestors of "member" at "level" or "index" distance above the member. (Most data sources support only one ancestor at a specified level. If the data source supports more than one ancestor, the result is a member set.) Example: ancestors ( [TrailChef Water Bag] , 1 ) Result: Cooking Gear Example: ancestors ( [TrailChef Water Bag] , 2 ) Result: Camping Equipment Example: ancestors ( [TrailChef Water Bag] , [great_outdoors_company].[Products].[Products].[Product type] ) Result: Cooking Gear generate ( set_expression1 , set_expression2 [ , all ] ) Evaluates "set_expression2" for each member of "set_expression1" and joins the resulting sets by union. The result retains duplicates only when the optional keyword "all" is supplied as the third argument. Example: generate ( [Product line] , topCount ( descendants ( currentMember ( [great_outdoors_company].[Products].[Products] ) ,  [great_outdoors_company].[Products].[Products].[Product name] ) , 2 , [Revenue] ) ) Result: Returns the top two products by revenue for each product line. head ( set_expression [ , index_expression ] ) Returns the first "index_expression" elements of "set_expression". The default for "index_expression" is 1. Example: head ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) ) Result: Camping Equipment Example: head ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) , 2 ) Result: Returns the top two members of the Product line set. Camping Equipment Mountaineering Equipment hierarchize ( set_expression ) Orders the members of "set_expression" in a hierarchy. Members in a level are sorted in their natural order. This is the default ordering of the members along a dimension when no other sort conditions are specified. Example: hierarchize ( set ( [Golf Equipment] , [Mountaineering Equipment] , [Camping Equipment] ) ) Result: Returns Camping Equipment, Golf Equipment, Mountaineering Equipment. mtd ( [ member ] ) Returns a set of sibling members from the same level as "member", starting with the first sibling and ending with "member", as constrained by the month level in the time dimension. If no member is specified, the default is the currentMember of the time dimension. order ( set_expression , value_expression [ , ASC|DESC|BASC|BDESC ] ) Arranges the members of "set_expression" according to their "value_expression" and the third parameter. ASC and DESC arrange members in ascending or descending order, respectively, according to their position in the set hierarchy. Then the children of each member are arranged according to "value_expression". BASC and BDESC arrange members in the set without regard to the hierarchy. In the absence of an explicit specification, ASC is the default. Example: order ( members ( [Great Outdoors Company].[Product].[Product].[Product type] ) , [Quantity sold] , BASC ) Result: Returns the quantity sold for each product type in no particular order. ProdLine Quantity ------------ ------------- Woods 13,924 Irons 14,244 Safety 22,332 ... ... Sun 215,432 Repellent 270,04 Lanterns 345,096 Example: order ( members ( [Great Outdoors Company].[Product].[Product].[Product type] ) , [Quantity sold] , ASC ) Result: Returns the quantity sold for each product type in ascending order. ProdLine Quantity ------------ ------------- Woods 13,924 Irons 14,244 Putters 23,244 ... ... Tents 130,664 Cooking 198,676 Lanterns 345,096 qtd ( [ member] ) Returns a set of sibling members from the same level as "member", starting with the first sibling and ending with "member", as constrained by the quarter level in the time dimension. If no member is specified, the default is the currentMember of the time dimension. set ( member { , member } ) Returns the list of members defined in the expression. The members must belong to the same hierarchy. Example: set ( [Golf Equipment] , [Irons] , [TrailChef Cup] ) Result: Returns Golf Equipment, Irons, and TrailChef Cup. siblings ( member ) Returns the children of the parent of the specified member. Example: siblings ( [Golf Equipment] ) Result: Returns the siblings of Golf Equipment. Camping Equipment Golf Equipment Mountaineering Equipment Outdoor Protection Personal Accessories subset ( set_expression, index_expression1 [ , index_expression2 ] ) Returns a subset of members in "set_expression" starting at "index_expression1" from the beginning. If the count "index_expression2" is specified, that many members are returned (if available). Otherwise, all remaining members are returned. Example: subset ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) , 2 ) Result: Returns the members of the Product line set starting at the second member. Mountaineering Equipment Outdoor Protection Personal Accessories Example: subset ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) , 2 , 2 ) Result: Returns two members of the Product line set starting at the second member. Mountaineering Equipment Outdoor Protection tail ( set_expression [ , index_expression ] ) Returns the last "index_expression" elements of "set expression". The default for "index_expression" is 1. Example: tail (members ( [great_outdoors_company].[Products].[Products].[Product line] ) ) Result: Returns the last member of the Product line set. Personal Accessories Example: tail ( members ( [great_outdoors_company].[Products].[Products].[Product line] ) , 2 ) Result: Returns the last two members of the Product line set. Outdoor Protection Personal Accessories tuple (  member { , member } ) Identifies a cell location (intersection) based on the specified members, each of which must be from a different dimension. This function implicitly includes the current member from all dimensions that are not otherwise specified in the arguments. The current member of any dimension not specified in the evaluating context is assumed to be the default member of that dimension. The value of this cell can be obtained with the "value" function. Example: tuple ( [Mountaineering Equipment] , [Fax] ) Result: Returns the Mountaineering Equipment sales by fax. wtd ( [member] ) Returns a set of sibling members from the same level as "member", starting with the first sibling and ending with "member", as constrained by the week level in the time dimension. If no member is specified, the default is the currentMember of the time dimension. ytd ( [member] ) Returns a set of sibling members from the same level as "member", starting with the first sibling and ending with "member", as constrained by the year level in the time dimension. If no member is specified, the default is the currentMember of the time dimension.
Member Summaries This list contains predefined functions that return either a single summary value for a set of members or a different summary value for each member of a set of members. aggregate ( < currentMeasure|numeric_expression > within set set_expression ) aggregate ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns a calculated value using the appropriate aggregation function based on the aggregation type of the expression. average ( < currentMeasure|numeric_expression > within set set_expression ) average ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the average value of the selected data items. Example: average ( Sales ) Result: Returns the average of all Sales values. count ( < currentMeasure|numeric_expression > within set set_expression ) count ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the number of selected data items excluding null values. Example: count ( Sales ) Result: Returns the total number of entries under Sales. maximum ( < currentMeasure|numeric_expression > within set set_expression ) maximum ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the maximum value of selected data items. Example: maximum ( Sales ) Result: Returns the maximum value out of all Sales values. median ( < currentMeasure|numeric_expression > within set set_expression ) median ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the median value of selected data items. minimum ( < currentMeasure|numeric_expression > within set set_expression ) minimum ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the minimum value of selected data items. Example: minimum ( Sales ) Result: Returns the minimum value out of all Sales values. Returns the percent of the total value for the selected data items. percentage ( numeric_expression [ tuple member_expression { , member_expression } ] within set set_expression ) Example: percentage ( [gosales].[sales measures].[quantity] tuple [gosales].[Staff].[].[department] -> [West] within set children ( [gosales].[Staff].[].[Staff] ) ) Returns a value, on a scale from 0 to 100, that indicates the percent of a distribution that is equal to or below the selected data items. percentile ( numeric_expression [ tuple member_expression { , member_expression } ] within set set_expression ) Returns the rank of a value for the specified range. It returns integers to represent any range of ranks, such as 1 (highest) to 100 (lowest). quantile ( numeric_expression , numeric_expression [ tuple member_expression { , member_expression } ] within set set_expression ) Returns the rank of a value, represented as integers from 1 (highest) to 4 (lowest), relative to a group of values. quartile ( numeric_expression [ tuple member_expression { , member_expression } ] within set set_expression ) Returns the rank value of the selected data items. The type of ranking returned (Olympic, dense, or serial) is data source dependent. The sort order is optional; DESC is assumed by default. rank ( numeric_expression [ ASC|DESC ] [ tuple member_expression { , member_expression } ] within set set_expression ) Example: rank ( [gosales].[sales measures].[quantity] tuple [gosales].[Staff].[].[department] -> [West] within set children ( [gosales].[Staff].[].[Staff] ) ) standard-deviation ( < currentMeasure|numeric_expression > within set set_expression ) standard-deviation ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the standard deviation of the selected data items. standard-deviation-pop ( < currentMeasure|numeric_expression > within set set_expression ) standard-deviation-pop ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the standard deviation population of the selected data items. total ( < currentMeasure|numeric_expression > within set set_expression ) total ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the total value of the selected data items. variance ( < currentMeasure|numeric_expression > within set set_expression ) variance ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the variance of the selected data items. variance-pop ( < currentMeasure|numeric_expression > within set set_expression ) variance-pop ( < currentMeasure|numeric_expression > within < detail|aggregate > expression ) Returns the variance population of the selected data items.
OLAP