Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default calculated member analysis services

Hi

If I shoot this off against an 2005 cube from excel 2007 it works:

Sub UseCalculatedMember()
Dim pvtTable As PivotTable

Windows("test2000.xlsx").Activate
Set pvtTable = Worksheets("Sheet2").Range("A1").PivotTable

' Add the calculated member.
pvtTable.CalculatedMembers.Add Name:="[Measures].[test3]",
Formula:="'[Measures].[Actual Unit Cost]'", Type:=xlCalculatedMeausure
End Sub


Howerver. If I try doin the same against a 2000 analysis services cube it
fails with

run-time error 1004
application-defined or object-define error

I tried changing the formula to 1000 instead of certain calculated measure
and then it works. Cant excel 2007 vba create calculated measure againt
analysis services 2000 cube?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default calculated member analysis services


According to my Excel 2000 help file, there is no CalculatedMembers property for a pivot table. However, XL2002 does provide that
property.
--
Jim Cone
Portland, Oregon USA




"michael vardinghus" <xx
wrote in message
Hi
If I shoot this off against an 2005 cube from excel 2007 it works:

Sub UseCalculatedMember()
Dim pvtTable As PivotTable
Windows("test2000.xlsx").Activate
Set pvtTable = Worksheets("Sheet2").Range("A1").PivotTable
' Add the calculated member.
pvtTable.CalculatedMembers.Add Name:="[Measures].[test3]",
Formula:="'[Measures].[Actual Unit Cost]'", Type:=xlCalculatedMeausure
End Sub

Howerver. If I try doin the same against a 2000 analysis services cube it
fails with
run-time error 1004
application-defined or object-define error
I tried changing the formula to 1000 instead of certain calculated measure
and then it works. Cant excel 2007 vba create calculated measure againt
analysis services 2000 cube?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default calculated member analysis services

A lot of version numbers in this.

Its not about old excel version - its about how excel 2007 is able to create
this at different versions of Analysis Services.

I read an article about XL2002 and i beleive it with that version was
possible to create against Analysis Services 2000. However when i use excel
2007
i seem only to be able to create against Analysis Services 2005.

Ive googled a lot and wanted to hear if someone tried against AS 2000 from
excel 2007.



"Jim Cone" skrev i en meddelelse
...

According to my Excel 2000 help file, there is no CalculatedMembers
property for a pivot table. However, XL2002 does provide that
property.
--
Jim Cone
Portland, Oregon USA




"michael vardinghus" <xx
wrote in message
Hi
If I shoot this off against an 2005 cube from excel 2007 it works:

Sub UseCalculatedMember()
Dim pvtTable As PivotTable
Windows("test2000.xlsx").Activate
Set pvtTable = Worksheets("Sheet2").Range("A1").PivotTable
' Add the calculated member.
pvtTable.CalculatedMembers.Add Name:="[Measures].[test3]",
Formula:="'[Measures].[Actual Unit Cost]'", Type:=xlCalculatedMeausure
End Sub

Howerver. If I try doin the same against a 2000 analysis services cube it
fails with
run-time error 1004
application-defined or object-define error
I tried changing the formula to 1000 instead of certain calculated measure
and then it works. Cant excel 2007 vba create calculated measure againt
analysis services 2000 cube?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format of calculated member in VBA Whitebear Excel Programming 6 March 5th 07 09:30 AM
SSAS Calculated Member in Pivot Table GSwan Excel Discussion (Misc queries) 0 March 1st 07 02:50 PM
Calculated Members from analysis services sansimeon Excel Discussion (Misc queries) 2 October 10th 06 10:29 PM
Excel Add-In for Analysis Services - What-If ssauerw Excel Programming 0 August 17th 06 09:08 AM
PivotTableWizard using SQL Analysis Services Kam Excel Programming 0 June 29th 06 07:54 AM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"