dbTalk Databases Forums  

solve_order issue

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


Discuss solve_order issue in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrice Lamarche
 
Posts: n/a

Default solve_order issue - 05-17-2004 , 12:35 PM






I have a little problem

when i execute my statement

with member [Time].[Mois Courrant] AS
'Tail([Time].[Month].members,1).item(0)', solve_order = 1
member [Time].[12 Mois (AC)] AS
'Aggregate(LastPeriods(12,[Time].[Mois Courrant] ))' , solve_order = 2
member [Time].[12 Mois (AC-1)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,1, [Time].[Mois
Courrant] )))' , solve_order = 2
member [Time].[12 Mois (AC-2)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,2, [Time].[Mois
Courrant] )))' , solve_order = 2

select {[Time].[12 Mois (AC)],[Time].[12 Mois (AC-1)],[Time].[12 Mois
(AC-2)],[Time].[Mois Courrant]} on columns, product.children on rows from
sales

all the number are null but when I replace directly [Mois Courrant] in the
query by it's expression the number are good


thanks

Best Regards,
Patrice



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: solve_order issue - 05-17-2004 , 04:58 PM






This is not a Solve Order issue, since all the calculated members are on
the same dimension. Rather, MDX dimension hierarchy functions work
differently with a calculated member such as [Mois Courant]. Try a Named
Set instead:

Quote:
With Set [Mois Courrant] AS
'Tail(NonEmptyCrossJoin([Time].[Month].members))'
member [Time].[12 Mois (AC)] AS
'Aggregate(LastPeriods(12,[Mois Courrant].item(0)))'
member [Time].[12 Mois (AC-1)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,1, [Mois
Courrant].item(0))))'
member [Time].[12 Mois (AC-2)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,2, [Mois
Courrant].item(0))))'

select {[Time].[12 Mois (AC)],[Time].[12 Mois (AC-1)],[Time].[12 Mois
(AC-2)],[Mois Courrant]} on columns,
product.children on rows
from sales

Quote:

- Deepak

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


Reply With Quote
  #3  
Old   
Patrice Lamarche
 
Posts: n/a

Default Re: solve_order issue - 05-18-2004 , 08:07 AM



Excellent,
thanks you very much

"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> a écrit dans le message de
news:erFJJoFPEHA.556 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
This is not a Solve Order issue, since all the calculated members are on
the same dimension. Rather, MDX dimension hierarchy functions work
differently with a calculated member such as [Mois Courant]. Try a Named
Set instead:


With Set [Mois Courrant] AS
'Tail(NonEmptyCrossJoin([Time].[Month].members))'
member [Time].[12 Mois (AC)] AS
'Aggregate(LastPeriods(12,[Mois Courrant].item(0)))'
member [Time].[12 Mois (AC-1)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,1, [Mois
Courrant].item(0))))'
member [Time].[12 Mois (AC-2)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,2, [Mois
Courrant].item(0))))'

select {[Time].[12 Mois (AC)],[Time].[12 Mois (AC-1)],[Time].[12 Mois
(AC-2)],[Mois Courrant]} on columns,
product.children on rows
from sales




- Deepak

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



Reply With Quote
  #4  
Old   
Patrice Lamarche
 
Posts: n/a

Default Re: solve_order issue - 05-18-2004 , 08:13 AM



Hello,

I would like to know why you use a NonEmptyCrossjoin?

Thanks,

Patrice
"Patrice Lamarche" <patrice_lamarche (AT) gcomnitech (DOT) com.nospam> a écrit dans le
message de news:O7fgVkNPEHA.3052 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
Excellent,
thanks you very much

"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> a écrit dans le message de
news:erFJJoFPEHA.556 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
This is not a Solve Order issue, since all the calculated members are on
the same dimension. Rather, MDX dimension hierarchy functions work
differently with a calculated member such as [Mois Courant]. Try a Named
Set instead:


With Set [Mois Courrant] AS
'Tail(NonEmptyCrossJoin([Time].[Month].members))'
member [Time].[12 Mois (AC)] AS
'Aggregate(LastPeriods(12,[Mois Courrant].item(0)))'
member [Time].[12 Mois (AC-1)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,1, [Mois
Courrant].item(0))))'
member [Time].[12 Mois (AC-2)] AS
'Aggregate(LastPeriods(12,ParallelPeriod([Time].Year,2, [Mois
Courrant].item(0))))'

select {[Time].[12 Mois (AC)],[Time].[12 Mois (AC-1)],[Time].[12 Mois
(AC-2)],[Mois Courrant]} on columns,
product.children on rows
from sales




- Deepak

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





Reply With Quote
  #5  
Old   
Deepak Puri
 
Posts: n/a

Default Re: solve_order issue - 05-18-2004 , 09:28 AM



Hi Patrice,

I used NonEmptyCrossJoin() because I was testing with the Foddmart Sales
cube, and wanted to select the newest month with data (there is no data
for 1998 months). If you don't care whether the newest month has data or
not, then NECJ() is not needed.


- Deepak

*** 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.