Calling a User-defined Function within MDX

After a user-defined function is registered in the Register Function Libraries dialog box, it can be used anywhere in the multidimensional expressions (MDX) syntax that allows expressions. For example:

With Member Measures.[Forecasted Sales] As

     'Sales * ForecastedGrowthRate(SaleReps.CurrentMember.Name)'

Select TopCount(SalesReps, HowManyReps(), Sales) on Rows,

     {Sales, [Forecasted Sales] } on Columns

From Sales

The HowManyReps and ForecastedGrowthRate user-defined functions are defined as:

Public Function HowManyReps() as Integer

Public Function ForecastedGrowthRate(RepName as String) as Double


Note There may be multiple user-defined functions residing in the same Microsoft® ActiveX® library.


See Also

Calculated Member Builder

Using the Register Function Libraries Dialog Box

(c) 1999 Microsoft Corporation. All Rights Reserved.