dbTalk Databases Forums  

Crete a calculated member using DSO

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


Discuss Crete a calculated member using DSO in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lucas Campos
 
Posts: n/a

Default Crete a calculated member using DSO - 09-10-2003 , 12:48 PM






Hi,
How can I create a calculated member using DSO? I couldn't find something
like that in the DSO programmers reference.

Any idea will be welcome

Thanks a lot

Lucas C



Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Crete a calculated member using DSO - 09-10-2003 , 04:01 PM






This is the technique that I use:
First, get the Analysis Services Meta data scriptor utility from the SQL
Server 2000 Resource Kit.
It generates a VB program that will use DSO to create the object you
specified.
So:
1) Run the meta data scriptor against the database
2) Add the calculated member via Analysis Manager
3) Run the meta data scriptor against the database
Then do a diff between the VB programs generated by #1 and #3

--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Practices Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Lucas Campos" <lcampos (AT) rmya (DOT) com.ar> wrote

Quote:
Hi,
How can I create a calculated member using DSO? I couldn't find something
like that in the DSO programmers reference.

Any idea will be welcome

Thanks a lot

Lucas C





Reply With Quote
  #3  
Old   
Lucas Campos
 
Posts: n/a

Default Re: Crete a calculated member using DSO - 09-10-2003 , 04:41 PM



Thanks a lot. I doesn''t new about it (Analysis Services Meta )
I received this code and I will evaluate those alternatives.

' create the new calculated member
Dim dsoCalculatedMember As DSO.Command
Set dsoCalculatedMember = m_dsoCube.Commands.AddNew("Average Sale")

' set the command type
dsoCalculatedMember.CommandType = cmdCreateMember

' set the MDX statement that defines the calculated member
dsoCalculatedMember.Statement = _
"CREATE MEMBER Sales.Measures.[Average Sale] AS " & _
"'[Measures].[Store Sales]/[Measures].[Sales Count]', " & _
"FORMAT_STRING = 'Currency'"

' save the cube definition in the metadata repository the calculated
member will be saved as a part of the cube
m_dsoCube.Update


"Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> escribió en el mensaje
news:Of#Eh69dDHA.556 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Quote:
This is the technique that I use:
First, get the Analysis Services Meta data scriptor utility from the SQL
Server 2000 Resource Kit.
It generates a VB program that will use DSO to create the object you
specified.
So:
1) Run the meta data scriptor against the database
2) Add the calculated member via Analysis Manager
3) Run the meta data scriptor against the database
Then do a diff between the VB programs generated by #1 and #3

--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Practices Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

"Lucas Campos" <lcampos (AT) rmya (DOT) com.ar> wrote in message
news:elY$cP8dDHA.2560 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi,
How can I create a calculated member using DSO? I couldn't find
something
like that in the DSO programmers reference.

Any idea will be welcome

Thanks a lot

Lucas C







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.