Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

LinRegPoint Expression ( MDX Query ) for forecasting......

$
0
0
I have a factsummary table that looks like the below:-I am using DimDate Dimension from the demo analysis services project. I have populated the dimension table accordingly. i.e uptil 2018.I need to look into the actuals(TOTAL) for 5 years and project the numbers for the next 3 fiscal years.I am converting an excel report into SSRS using SSAS as a data source. I have already defined a cube, set the time dimensions. In excel, i would use the linear expresison Y=a.x + bIn SSAS world, there is an equivalent, but i need help with getting the right results. I suspect that the calculation is not considering the range of the fiscal years..... DateKey FiscalYear total scenario_Key----------- ----------- ----------- -----------------20100101 2010 19700 120110101 2011 19800 120120101 2012 19900 120130101 2013 19650 120140101 2014 19451 120150101 2015 NULL 220160101 2016 NULL 220170101 2017 NULL 2--(8 row(s) affected)WITHMEMBER Measures.[Internet Sales Forecast] ASLinRegPoint(Rank( [Date].[Calendar].CurrentMember, [Date].[Calendar].CurrentMember.LEVEL.MEMBERS),Descendants( [Date].[Calendar].[Calendar Year], [Date].[Calendar].CurrentMember.LEVEL),[Measures].[Total],Rank( [Date].[Calendar], [Date].[Calendar].CurrentMember.LEVEL.MEMBERS)),FORMAT_STRING="#,0"SELECT DESCENDANTS( [Date].[Calendar].[Calendar Year], [Date].[Calendar].[Year]) ON COLUMNS,{ [Measures].[Total], [Measures].[Internet Sales Forecast]} ON ROWSFROM [Adventure Works]

Viewing all articles
Browse latest Browse all 1341

Trending Articles