Home      Functions     Common Solutions      Contact     






MDX Functions:
 
MDX Functions

 
Common Solutions

Common Solutions
 
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
 
Other Links

Contact Us
 
Microsoft SQL Server Analysis Services Function Page
Function Name: LinRegVariance
Category: Statistical
Description: The LinRegVariance function calculates the linear regression for the supplied set and returns the variance for the regression line (y = ax + b).
Syntax: LINREGVARIANCE( «Set», «Numeric Expression»[, «Numeric Expression»] )
Technet Link: MDX LinRegVariance Function




The query below returns the variance values based on the regression line for the Month members for the FY 2003 member.
 
WITH
      MEMBER Measures.[OrderCountVariance] AS
       LINREGVARIANCE(LASTPERIODS(30) AS
      [TimeSet], [Measures].[Order Count], RANK([Date].[Fiscal].CurrentMember, [TimeSet]))
SELECT
      {[Measures].[OrderCountVariance]} ON COLUMNS,
      DESCENDANTS([Date].[Fiscal].[FY 2003], [Date].[Fiscal].[Month]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

 
Copyright 2008 by MDXpert.com.
 
Terms of Use                              Privacy Statement
 
Site Powered By - WinHost.Com