Intrinsic Member Properties: The MEMBER_VALUE Property

About the Series …

This article is a member of the series, MDX Essentials.
The series is designed to provide hands-on application of the fundamentals of
the Multidimensional Expressions (MDX) language, with each tutorial
progressively adding features designed to meet specific real-world needs.

For more information about the series in general, as well as
the software and systems requirements for getting the most out of the lessons
included, please see my first article, MDX at First Glance: Introduction to MDX Essentials.

Note: Current updates are assumed for MSSQL
, MSSQL Server Analysis Services, and the related Books
and Samples.


In this lesson, we will examine another intrinsic member
, MEMBER_VALUE. As many of us are aware, and as we
have confirmed in various other articles within this
series, the intrinsic member
supported by SQL Server 2005 Analysis Services are of two
types: context sensitive member properties and non-context sensitive member
properties. MEMBER_VALUE belongs to the second group of properties.
As a general group, intrinsic member properties provide
additional information that can be used by applications to enhance the ultimate
user experience. Support for the non-context sensitive member properties is
the same for all members, regardless of individual context.

purpose of the MEMBER_VALUE property is to support the return of a value
for the member with which it is associated. MEMBER_VALUE can be useful in a host of different applications. Moreover, as I have noted to be the case
for other functions and properties within the MDX Essentials series,
MEMBER_VALUE allows us to exercise a great deal
of presentation “sleight of hand,” in working with MDX in Analysis Services,
as well as within Reporting Services and various other reporting
applications that can access an Analysis Services cube.

The MEMBER_VALUE property can be leveraged in
activities that range from generating simple lists to supporting sophisticated
presentations. It is a particularly effective tool when we need to provide parameter
support and the like, as we shall see. We shall introduce the
function, commenting upon its operation and touching upon examples of effects
that we can employ it to deliver. As a part of our discussion, we shall:

  • Examine the syntax surrounding the function;
  • Undertake illustrative examples of the uses of the function in
    practice exercises;
  • Briefly discuss the results datasets we obtain in the practice



According to the Analysis Services
Books Online
, the MEMBER_VALUE property specifies “the value of the
member in the original type.” The MEMBER_VALUE property is set within the ValueColumn
element of the Source properties group for a given dimension
attribute, as we shall see.

NOTE: For more information on the Source group
of attribute properties, together with the MEMBER_VALUE property, see my Database Journal article Dimension
Attributes: Introduction and Overview, Part V
, a member of my Introduction to MSSQL Server Analysis Services series.

As we shall see in the initial Preparation
steps of our Practice session below, the ValueColumn property
allows us to specify the column within the underlying data source from which Analysis
derives the value of the attribute. Within this
setting, we may find either the None or the New option (a
third option, representing a preselected column, will exist if a column has
already been selected – not the case in our current example, but possibly
different elsewhere).

As we noted in Dimension Attributes: Introduction and Overview, Part
, if we have specified a value in the NameColumn
, then the same value is used as the default in ValueColumn.
If we did not specify a value in the NameColumn property, and the KeyColumns
collection of the attribute contains a single KeyColumn element
representing a key column with a string data type, the same
values are used as default values for the ValueColumn element.

MEMBER_VALUE has many applications, including the rather obvious
uses with Analysis Services members that are included in the definition, as
well as its pairing with other MDX functions to leverage its power even
further. For example, as we have seen is the case with the .Name
function (among many other functions), in earlier articles of this series, MEMBER_VALUE
can also be synergistically
combined with the .CurrentMember
function; we will see an example of this specific combination within the
practice exercises below.

We will examine the syntax involved in
leveraging the MEMBER_VALUE property
after our customary overview in the Discussion section that follows.
After that, we will conduct practice examples within a couple of scenarios,
constructed to support hypothetical business needs that illustrate uses for the
property. This will afford us an opportunity to explore some of the
presentation options that MEMBER_VALUE can
offer the knowledgeable user. Hands-on practice with MEMBER_VALUE, where we will create expressions that leverage the function, will
help us to activate what we learn in the Discussion and Syntax
sections that follow.


To restate our initial explanation of its operation, the MEMBER_VALUE
, when acting upon a member, returns the “assigned value” of
the object to which it is appended with the period (“.”) delimiter. MEMBER_VALUE
can be used for a great deal more than the support of simple lists of unique
object names, as we have intimated. When we couple it with other functions, we
can leverage MEMBER_VALUE to deliver a wide range of analysis and
reporting utility. As in so many cases with the Microsoft integrated business
intelligence solution, consisting of MSSQL Server, Analysis Services
and Reporting Services, this function, residing within the Analysis
layer, can be extended to support capabilities and attributes in
the Reporting Services layer. Knowing “where to put the intelligence”
among the various layers is critical to optimization, in many cases. For more
of my observations on this subject, see Multi-Layered
Business Intelligence Solutions … Require Multi-Layered Architects

The MEMBER_VALUE property returns, as we have noted, the
value contained within the column of the underlying data source from which Analysis
derives the value of the attribute, and can be used
for querying and display, among other, purposes. Let’s look at some syntax
illustrations to further clarify the operation of MEMBER_VALUE.


Syntactically, anytime we
employ the MEMBER_VALUE property to return the associated value,
the member for which we seek to return the value is specified to
the left of MEMBER_VALUE. The property takes the object to which
it is appended as its argument, and returns, within its original data type, the
value of the object specified. The general syntax is shown in the
following string:


In short, putting MEMBER_VALUE to
work couldn’t be easier. When specifying the property to return the value
of a member or members, we simply append it to the right of the member(s)
under consideration.

As is typically the case with
MDX functions, operators and properties, the MEMBER_VALUE property can
often be best leveraged by combining it with other functions, operators or
properties, particularly “relative” functions, to generate lists of names, and
so forth, as we shall see in short order.

NOTE: For information
on several of the “relative” functions, see my article
Member Functions: "Relative" Member Functions
within the Database Journal MDX

We will practice some uses of the MEMBER_VALUE property
in the section that follows.

William Pearson
William Pearson
Bill has been working with computers since before becoming a "big eight" CPA, after which he carried his growing information systems knowledge into management accounting, internal auditing, and various capacities of controllership. Bill entered the world of databases and financial systems when he became a consultant for CODA-Financials, a U.K. - based software company that hired only CPA's as application consultants to implement and maintain its integrated financial database - one of the most conceptually powerful, even in his current assessment, to have emerged. At CODA Bill deployed financial databases and business intelligence systems for many global clients. Working with SQL Server, Oracle, Sybase and Informix, and focusing on MSSQL Server, Bill created Island Technologies Inc. in 1997, and has developed a large and diverse customer base over the years since. Bill's background as a CPA, Internal Auditor and Management Accountant enable him to provide value to clients as a liaison between Accounting / Finance and Information Services. Moreover, as a Certified Information Technology Professional (CITP) - a Certified Public Accountant recognized for his or her unique ability to provide business insight by leveraging knowledge of information relationships and supporting technologies - Bill offers his clients the CPA's perspective and ability to understand the complicated business implications and risks associated with technology. From this perspective, he helps them to effectively manage information while ensuring the data's reliability, security, accessibility and relevance. Bill has implemented enterprise business intelligence systems over the years for many Fortune 500 companies, focusing his practice (since the advent of MSSQL Server 2000) upon the integrated Microsoft business intelligence solution. He leverages his years of experience with other enterprise OLAP and reporting applications (Cognos, Business Objects, Crystal, and others) in regular conversions of these once-dominant applications to the Microsoft BI stack. Bill believes it is easier to teach technical skills to people with non-technical training than vice-versa, and he constantly seeks ways to graft new technology into the Accounting and Finance arenas. Bill was awarded Microsoft SQL Server MVP in 2009. Hobbies include advanced literature studies and occasional lectures, with recent concentration upon the works of William Faulkner, Henry James, Marcel Proust, James Joyce, Honoré de Balzac, and Charles Dickens. Other long-time interests have included the exploration of generative music sourced from database architecture.

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles