dbTalk Databases Forums  

Using ADOMD and MDX to create a cross-tab

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Using ADOMD and MDX to create a cross-tab in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kory Skistad
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.