dbTalk Databases Forums  

Calculated Member issue with MetaData Scripter

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


Discuss Calculated Member issue with MetaData Scripter in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John O'Brien
 
Posts: n/a

Default Calculated Member issue with MetaData Scripter - 05-20-2004 , 05:37 PM






I have a cube with no visible measures, and 2 visible calculated
members. If I use the MetaData Scripter to script out the cube and
then run the script file with no changes at all, the calculated
members fail to get created. Anyone have any idea why?

Here's the code that the scripter generated for the 2 members:
' Scripting cube command Inventory for cube Capacity012004_Shared
strStatement = ""
strStatement = strStatement & "CREATE MEMBER
CURRENTCUBE.Measures.[Inventory] AS
'IIF([Intel_Time].currentmember.level.ordinal =
[Intel_Time].[Month].ordinal,([Measures].[Inventory_sum]),Max(Descendants([Intel_Time].currentmember,[Quarter],AFTER),
[Measures].[Inventory_sum]))', NON_EMPT"
strStatement = strStatement & "Y_BEHAVIOR = 'Inventory_sum'"
BuildCubeCommand sstrName_Database, sstrName_Cube, "Inventory", 1, "",
strStatement, 0

' Scripting cube command Requirements for cube Capacity012004_Shared
strStatement = ""
strStatement = strStatement & "CREATE MEMBER
CURRENTCUBE.Measures.[Requirements] AS
'IIF([Intel_Time].currentmember.level.ordinal =
[Intel_Time].[Month].ordinal,([Measures].[Requirements_sum]),Max(Descendants([Intel_Time].currentmember,[Quarter],AFTER),
[Measures].[Requirements_sum]))',"
strStatement = strStatement & " NON_EMPTY_BEHAVIOR =
'Requirements_sum'"
BuildCubeCommand sstrName_Database, sstrName_Cube, "Requirements", 1,
"", strStatement, 0

Thanks,
John

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

Default Re: Calculated Member issue with MetaData Scripter - 05-20-2004 , 07:57 PM






You must have at least one visual member in a cube.
--
Dave Wickert [MS]
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.


"John O'Brien" <jaobrien6 (AT) yahoo (DOT) com> wrote

Quote:
I have a cube with no visible measures, and 2 visible calculated
members. If I use the MetaData Scripter to script out the cube and
then run the script file with no changes at all, the calculated
members fail to get created. Anyone have any idea why?

Here's the code that the scripter generated for the 2 members:
' Scripting cube command Inventory for cube Capacity012004_Shared
strStatement = ""
strStatement = strStatement & "CREATE MEMBER
CURRENTCUBE.Measures.[Inventory] AS
'IIF([Intel_Time].currentmember.level.ordinal =

[Intel_Time].[Month].ordinal,([Measures].[Inventory_sum]),Max(Descendants([I
ntel_Time].currentmember,[Quarter],AFTER),
Quote:
[Measures].[Inventory_sum]))', NON_EMPT"
strStatement = strStatement & "Y_BEHAVIOR = 'Inventory_sum'"
BuildCubeCommand sstrName_Database, sstrName_Cube, "Inventory", 1, "",
strStatement, 0

' Scripting cube command Requirements for cube Capacity012004_Shared
strStatement = ""
strStatement = strStatement & "CREATE MEMBER
CURRENTCUBE.Measures.[Requirements] AS
'IIF([Intel_Time].currentmember.level.ordinal =

[Intel_Time].[Month].ordinal,([Measures].[Requirements_sum]),Max(Descendants
([Intel_Time].currentmember,[Quarter],AFTER),
Quote:
[Measures].[Requirements_sum]))',"
strStatement = strStatement & " NON_EMPTY_BEHAVIOR =
'Requirements_sum'"
BuildCubeCommand sstrName_Database, sstrName_Cube, "Requirements", 1,
"", strStatement, 0

Thanks,
John



Reply With Quote
  #3  
Old   
John
 
Posts: n/a

Default Re: Calculated Member issue with MetaData Scripter - 05-20-2004 , 11:23 PM



Visual member? Did you mean visible? I do have 2 visible measures, but
they are both calculated. This cube works perfectly fine if created
through Analysis Manager. Does DSO have a problem with cubes that only
have visible calculated measures? We've never had any problems with
this cube in the past, but when I script it out, and recreate it
directly from the vbscript file, the calculated measures don't show up
anymore.

Thanks,
John



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
John
 
Posts: n/a

Default Re: Calculated Member issue with MetaData Scripter - 05-25-2004 , 03:57 PM



No other information?

Thanks,
John


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.