Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can't for the life of me rember h

Status
Not open for further replies.

afzalz

Programmer
Aug 17, 2000
6
0
0
GB
I can't for the life of me rember how to add a calculated memeber into a virtual cube in OLAP 7.o - can anyone jogg my memory please???
 
Hi, Afzalz!
In visual basic this job can be done by the next code:

Dim dsoCube as As DSO.MDStore
Set dsoCube = dsoDB.MDStores("MyCube")

Dim dsoCalculatedMember As DSO.Command
Set dsoCalculatedMember = dsoCube.Commands.AddNew("MyCalc")

dsoCalculatedMember.CommandType = cmdCreateMember

'set the MDX statement that defines the calculated member
dsoCalculatedMember.Statement = "CREATE MEMBER MyCube.Measures.[MyCalc] AS '#WRITE HERE YOUR CALCULATED MEMBER FORMULA#'"

dsoCube.Update

please, notify me if it helped you to solve your problem

My best regards, Issahar
Issahar

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top