pivottable - calculated member not shown

A

Andrejh Horvat

Hi!

Im trying to add a calculated member to Olap Cube and display it in
PivotTable.
The code is use is the one found on msdn.
--
PivotControl.ActiveView.DisplayCalculatedMembers = True

Set conn = PivotControl.Connection
Set View = PivotControl.ActiveView

conn.Execute "Create member [myCube].[Measures].[Index] as '100'"
conn.Execute "Create member [myCube].[Time].[Index] as
'([Time].[Year].&[2002]/[Time].[Year].&[2001])*100'"

PivotControl.Refresh

The problem is that the first code adds and displays Index under Totals, but
the
second doesnt. If i run the second command twice i get error: member
Time.Index already exist. Which means that the Member does exists its only
not shown in the time dimension. The same happens if i create calculated
member via Analysis Manager. The calculated member is not shown in the field
list no matter what i do.
Does anybody know what am i doing wrong?
Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top