Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX - Cube Calculated member sliding 12 month comparison with previous month data

$
0
0
Hi,

I want to compare Aggregate of following two different resultsets:


SELECT 
[Measures].[Internet Sales Amount] ON COLUMNS,
NON Empty

{
	LastPeriods(
		12, [Date].[Calendar].[Month].[January 2008]
	)
}
 On Rows
FROM
	[Adventure Works];
GO



SELECT 
[Measures].[Internet Sales Amount] ON COLUMNS,
NON Empty

{
	LastPeriods(
		12, [Date].[Calendar].[Month].[February 2008]
	)
}
 On Rows
FROM
	[Adventure Works];
GO




Now actually i want to add a calculated member in the cube in a way that in Current Month, it compares aggregated sales of previous 12 months with the aggregate of previous 12 month from one month before previous month.

For example

In march 2008
Aggregate(Mar2007 .... Feb2008) , 
Aggregate(Feb2007 .... Jan2008) ,
Aggregate(Mar2007 .... Feb2008) - Aggregate(Feb2007 .... Jan2008) AS Rolling_12Month_Growth.

Note: it is different from Month-Over-Month Growth.

So any clue please?

Thanks.

Think BIG but Positive, may be GLOBAL better UNIVERSAL.


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>