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: LinRegPoint
Category: Statistical
Description: The LinRegPoint function returns the value of the y intercept in the regression line (y = ax + b) for the supplied value of x.
Syntax: LINREGPOINT( «Numeric Expression», «Set», «Numeric Expression»[, «Numeric Expression»] )
Technet Link: MDX LinRegPoint Function




The query below shows the forecast values (using the LinRegPoint function) for the Order Count measure for the members of the Month level for FY 2004.
 
WITH
      MEMBER Measures.[OrderCountForecast] AS LINREGPOINT(RANK([Date].[Fiscal].CurrentMember, [Date].[Fiscal].CurrentMember.LEVEL.MEMBERS), DESCENDANTS([Date].[Fiscal].[Fiscal Year].[FY 2004], [Date].[Fiscal].CurrentMember.LEVEL), [Measures].[Order Count], RANK([Date].[Fiscal].CurrentMember, [Date].[Fiscal].CurrentMember.LEVEL.MEMBERS))
SELECT
      {[Measures].[Order Count], [Measures].[OrderCountForecast]} ON COLUMNS,
      DESCENDANTS([Date].[Fiscal].[FY 2004], [Date].[Fiscal].[Month]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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