![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----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?????????????? . |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
-----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?????????????? . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |