PC Review


Reply
Thread Tools Rate Thread

calculated member analysis services

 
 
michael vardinghus
Guest
Posts: n/a
 
      11th Oct 2008
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 With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      11th Oct 2008

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 With Quote
 
michael vardinghus
Guest
Posts: n/a
 
      11th Oct 2008
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" <(E-Mail Removed)> skrev i en meddelelse
news:u5SLk$(E-Mail Removed)...
>
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007, SSAS2005, Calculated Member Format Does Not Pull Into Sheet Dwight Specht Microsoft Excel Discussion 1 24th Jun 2008 03:31 PM
Format of calculated member in VBA =?Utf-8?B?V2hpdGViZWFy?= Microsoft Excel Programming 6 5th Mar 2007 09:30 AM
SSAS Calculated Member in Pivot Table =?Utf-8?B?R1N3YW4=?= Microsoft Excel Misc 0 1st Mar 2007 02:50 PM
Pivot table from Analysis Services-Problem with calculated cells =?Utf-8?B?QWxleA==?= Microsoft Excel Misc 0 2nd Jan 2007 04:49 AM
Calculated Members from analysis services =?Utf-8?B?c2Fuc2ltZW9u?= Microsoft Excel Misc 2 10th Oct 2006 10:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 PM.