dbTalk Databases Forums  

MDX Bug ????

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


Discuss MDX Bug ???? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Reinfried Englmair
 
Posts: n/a

Default MDX Bug ???? - 08-21-2003 , 01:54 AM






When I use the MDX-function LinRegPoint with Foodmart2000
the cell values display "#Err'.

With
member [Measures].[Trend] AS 'LinRegPoint(3, LastPeriods
(2,[1997].[Q4]), [Measures].[Unit Sales])'
Select
{[Measures].[Unit Sales], [Measures].[Trend]} ON COLUMNS,
{Descendants([Time].[1997],[Month])} ON ROWS
FROM Sales

When I create the [Measures].[Trend] in the cube as
calculated member the cell values display "#Err'
and error message:

Infinite recursion detected during execution of
calculated
member.

Is this a bug??????????????



Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default MDX Bug ???? - 08-21-2003 , 02:57 PM






Not a bug, but certainly poor documentation.
For the lingrepoint function to work in this case you have
to set up its fourth parameter to convert the members of
the set into x-axis coordinates for the linear regression.
To do that you use the rank function.
Your query should look something like this:

With
member [Measures].[Trend] AS 'LinRegPoint(3, LastPeriods
(2,[1997].[Q4]), [Measures].[Unit Sales] , rank( time ,
lastperiods(2,[1997].[q4] ) ) )'
Select
{[Measures].[Unit Sales], [Measures].[Trend]} ON COLUMNS,
{Descendants([Time].[1997],[Quarter])} ON ROWS
FROM Sales

I've changed Month to Quarter on rows because this are the
members you are using to create the linear regression. If
you want to use months then you should change the
Lastperiods second argument to a month instead of a
quarter.
HTH,
Brian
www.geocities.com/brianaltmann/olap.html

Quote:
-----Original Message-----
When I use the MDX-function LinRegPoint with Foodmart2000
the cell values display "#Err'.

With
member [Measures].[Trend] AS 'LinRegPoint(3, LastPeriods
(2,[1997].[Q4]), [Measures].[Unit Sales])'
Select
{[Measures].[Unit Sales], [Measures].[Trend]} ON COLUMNS,
{Descendants([Time].[1997],[Month])} ON ROWS
FROM Sales

When I create the [Measures].[Trend] in the cube as
calculated member the cell values display "#Err'
and error message:

Infinite recursion detected during execution of
calculated
member.

Is this a bug??????????????


.


Reply With Quote
  #3  
Old   
Reinfried Englmair
 
Posts: n/a

Default Re: MDX Bug ???? - 08-22-2003 , 01:35 AM




Brian,

Thank you very much for your help. The LinRegPoint-Function works
perfect.

Reinfried


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

Reply With Quote
  #4  
Old   
Reinfried Englmair
 
Posts: n/a

Default MDX Bug ???? - 08-22-2003 , 04:03 AM




Quote:
-----Original Message-----
Not a bug, but certainly poor documentation.
For the lingrepoint function to work in this case you
have
to set up its fourth parameter to convert the members of
the set into x-axis coordinates for the linear regression.
To do that you use the rank function.
Your query should look something like this:

With
member [Measures].[Trend] AS 'LinRegPoint(3, LastPeriods
(2,[1997].[Q4]), [Measures].[Unit Sales] , rank( time ,
lastperiods(2,[1997].[q4] ) ) )'
Select
{[Measures].[Unit Sales], [Measures].[Trend]} ON COLUMNS,
{Descendants([Time].[1997],[Quarter])} ON ROWS
FROM Sales

I've changed Month to Quarter on rows because this are
the
members you are using to create the linear regression. If
you want to use months then you should change the
Lastperiods second argument to a month instead of a
quarter.
HTH,
Brian
www.geocities.com/brianaltmann/olap.html

-----Original Message-----
When I use the MDX-function LinRegPoint with
Foodmart2000
the cell values display "#Err'.

With
member [Measures].[Trend] AS 'LinRegPoint(3, LastPeriods
(2,[1997].[Q4]), [Measures].[Unit Sales])'
Select
{[Measures].[Unit Sales], [Measures].[Trend]} ON
COLUMNS,
{Descendants([Time].[1997],[Month])} ON ROWS
FROM Sales

When I create the [Measures].[Trend] in the cube as
calculated member the cell values display "#Err'
and error message:

Infinite recursion detected during execution of
calculated
member.

Is this a bug??????????????


.

.

Brian,

Thank you very much. The LinRegPoint-Function works
perfect.

Reinfried


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.