Database Reference
In-Depth Information
value. This function accepts the attribute (level) that Analysis Services should
examine and a number of periods to skip. The positive value of the second
parameter will check for prior periods, whereas the negative value will check
for periods that follow. For example, the following expression will get the in-
ternet sales amount for the month that is two months ahead of the current
calendar month:
(ParallelPeriod([Date].[Calendar].Month,
2,
[Date].[Calendar].CurrentMember),[Measures].[Internet
Sales Amount] )
5. Next use the expression defined in the previous step to subtract the sales
realized two months ago from the current sales for each month within the
2007 calendar year:
WITH MEMBER [Measures].[Compared To Two
Months Ago] AS
[Measures].[Internet Sales Amount] -
(ParallelPeriod([Date].[Calendar].Month,
2, [Date].[Calendar].CurrentMember),
[Measures].[Internet Sales Amount] )
SELECT {[Measures].[Internet Sales
Amount], [Measures].[Compared To Two
Months Ago]} ON 0,
[Date].[Calendar].[Month].members ON 1
FROM [Adventure Works]
WHERE [date].[calendar year].[cy 2007]
The result is as follows:
Internet Sales Amount
Compared to Two Months Ago
Jan-07
$438,865.17
$103,770.08
Search WWH ::




Custom Search