28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAP</strong> <strong>HANA</strong> supports the use of variables in MDX queries; the variables are a <strong>SAP</strong>-specific enhancement to<br />

standard MDX syntax. You can specify values for all mandatory variables that are defined in <strong>SAP</strong> <strong>HANA</strong> studio to<br />

various modeling entities. The following example illustrates how to declare <strong>SAP</strong> <strong>HANA</strong> variables and their values:<br />

MDX<br />

Select<br />

From [MINI_C1_VAR]<br />

Where [Measures].[M2_1_M3_CONV]<br />

<strong>SAP</strong> VARIABLES [VAR_VAT] including 10,<br />

[VAR_K2] including 112,<br />

[VAR_TARGET_CURRENCY] including 'EUR',<br />

8.2.5 MDX Functions<br />

MDX in <strong>SAP</strong> <strong>HANA</strong> supports a variety of standard MDX functions.<br />

Table 9: Supported MDX Functions<br />

Function Description<br />

Aggregate Returns a calculated value using the appropriate aggregate function, based on the<br />

aggregation type of the member.<br />

Ancestor Returns the ancestor of a member at a specified level or at a specific distance away<br />

in the hierarchy.<br />

Ancestors Returns a set of all ancestors of a member at a specified level or at a specific<br />

distance away in the hierarchy.<br />

Ascendants Returns the set of the ascendants of the member.<br />

Avg Returns the average value of a numeric expression evaluated over a set.<br />

BottomCount Returns a specified number of items from the bottom of a set, optionally sorting<br />

the set first.<br />

Children Returns the children of a member.<br />

ClosingPeriod Returns the last sibling among the descendants of a member at a specified level.<br />

Count Counts the number of members in the tuple.<br />

Cousin Returns the child member with the same relative position under a parent member<br />

as the specified child member.<br />

Crossjoin Returns the cross product of two sets.<br />

CurrentMember Returns the current member along a hierarchy.<br />

DefaultMember Returns the default member of a hierarchy.<br />

Descendants Returns the set of descendants of a member at a specified level or at a specific<br />

distance away in the hierarchy.<br />

Dimension Returns the hierarchy that contains a specified member or level.<br />

Dimensions Returns a hierarchy specified by a numeric or string expression.<br />

Distinct Returns a set, removing duplicate tuples from a specified set.<br />

DistinctCount Returns the number of distinct tuples in a set.<br />

204<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Defining Web-based Data Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!