![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| SQL Server 2005 Books Online |
#3
| |||
| |||
|
|
BOL provides this syntax and an example for LinReg2: http://msdn2.microsoft.com/en-us/library/ms145494.aspx SQL Server 2005 Books Online LinRegR2 (MDX) Updated: 17 July 2006 Syntax LinRegR2(Set_Expression, Numeric_Expression_y [ ,Numeric_Expression_x ] ) Example The following example returns the statistical R2 that describes the goodness of fit of the linear regression equation to the points for the unit sales and the store sales measures. LinRegR2(LastPeriods(10), [Measures].[Unit Sales],[Measures].[Store Sales]) Based on this, the 3rd argument could be like: LinRegR2(LastPeriods(60) as [TimeSet], [Measures].[Growth_Avg], Rank(Time.CurrentMember, [TimeSet])) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |