dbTalk Databases Forums  

AS2005: Looking for SCOPE samples...

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


Discuss AS2005: Looking for SCOPE samples... in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jéjé
 
Posts: n/a

Default AS2005: Looking for SCOPE samples... - 03-04-2006 , 11:50 AM






Hi,

I'm looking for samples which demonstrate the usage of the SCOPE feature in
AS2005.

Does it possible to define a scope for "any member except the All members"?
I mean, when the user select a particular measure and any member of any
attribute of my time dimension I have to apply a formula.
but if the user select nothing in the time dimension or select only "all
member" of the attribute, the formula will not by applied.

its a scope like:
scope(NOT root(time) , measures.M1);
measures.M1= 100;
end scope;

the leaves(time) doesn't provides the excpected result because this scope
define only the day level.
and the "NOT" function is not supported.

thanks.

jerome.




Reply With Quote
  #2  
Old   
Nobody
 
Posts: n/a

Default Re: AS2005: Looking for SCOPE samples... - 03-05-2006 , 08:18 PM






SQL Magazine has example of Scope:
http://www.windowsitpro.com/Windows/...57/pg/2/2.html

Bascially they do not restrict this in scope but rather in assignment close.
Their code is:

Listing 3: MDX Code That Assigns Formulas
// Assignment specifically targets years to exclude All, if present.
( [Date].[Fiscal Date Calculations].[Year to Date],
[Date].[Fiscal Year].[Fiscal Year].Members ) =

Aggregate(
{ [Date].[Fiscal Date Calculations].DefaultMember } *
PeriodsToDate(
[Date].[Fiscal].[Fiscal Year],
[Date].[Fiscal].CurrentMember
)
) ;

Regards,

Vimas




"Jéjé" <willgart (AT) BBBhotmailAAA (DOT) com> wrote

Quote:
Hi,

I'm looking for samples which demonstrate the usage of the SCOPE feature
in AS2005.

Does it possible to define a scope for "any member except the All
members"?
I mean, when the user select a particular measure and any member of any
attribute of my time dimension I have to apply a formula.
but if the user select nothing in the time dimension or select only "all
member" of the attribute, the formula will not by applied.

its a scope like:
scope(NOT root(time) , measures.M1);
measures.M1= 100;
end scope;

the leaves(time) doesn't provides the excpected result because this scope
define only the day level.
and the "NOT" function is not supported.

thanks.

jerome.






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.