Creating Custom Function @ MDX Level (SQL 2K) -
04-07-2006
, 09:57 AM
Greetings,
I am writing a MDX Query and use ColasceEmpty function for atleast 15-20
Mesures
example for one such measure :
-----PAR Value As on Report To Date
MEMBER
[Measures].[PARValue] as '([Measures].[PAR Value],
ClosingPeriod ([Transaction Dates].[Day], [Transaction
Dates].CurrentMember))'
-----PAR Value As on Report To Date (Recursion if data for Report To Date Do
not exist)
MEMBER
[Measures].[Relative Total Records in PAR] as ' CoalesceEmpty(
([Measures].[PARValue], [Transaction Dates].CurrentMember),
([Measures].[Relative Total Records in PAR], [Transaction
Dates].currentmember.prevmember))'
Is there a way I can avoid repetion of this block of code multiple times by
creating a custom function which in turn will call ColasceEmpty (basically a
wrapper function) :
and I will pass a couple of parameters like : New Measure Name , Measure.
Please advise |