Using ADOMD and MDX to create a cross-tab -
10-13-2003
, 12:41 PM
I have a process using ADOMD to run MDX queries and paste results in
Excel.
What I cannot seem to get working is using the calculated member in
the MDX Select statement.
Here are my statements:
CREATE SESSION MEMBER [CM_Performance].[Measures].[Sold UPB Pct] AS
'((Measures.[Prin Sold Bal],[Loan
Purpose].Currentmember,[Deals].CurrentMember) / (Measures.[Prin Sold
Bal], [Loan Purpose].[All Loan Purpose],[Deals].CurrentMember))',
Format_String = '0.0%'
CREATE SESSION SET [CM_Performance].Pivot0Axis0Set0 AS
'{{ [Deals].[All Deals] }, ORDER({ AddCalculatedMembers([Deals].[Deal
Series].MEMBERS)}, [Deals].CURRENTMEMBER.NAME, BASC)}'
SET [CM_Performance].Pivot0Axis1Set0 AS
'{ { [Loan Purpose].[All Loan Purpose] }, AddCalculatedMembers([Loan
Purpose].[Loan Purpose Dscr].MEMBERS)}'
SELECT
NON EMPTY Pivot0Axis0Set0 DIMENSION PROPERTIES MEMBER_NAME ON 0,
NON EMPTY Pivot0Axis1Set0 DIMENSION PROPERTIES MEMBER_NAME ON 1
FROM [CM_Performance] WHERE ([Deal Product].[All Deal Product].[Home
Equity])
Where do I introduce the [Sold UPB Pct] I've created earlier? In
either of the SET statements, or in the SELECT statement? I want this
measure to be the only data element in the result. Everything I've
tried has failed.
Thanks in advance.
Kory |