You are developing a Microsoft SQL Server 2005 Analysis Services (SSAS) project. The project contains a cube named Finance.
The Finance cube contains the following objects:
A measure group named SalesMeasures.
A measure named SalesAmount.
A time dimension named DimTime.
A time dimension hierarchy named Calendar that contains Year on the first level, Quarter on the second level, and Month on the third level.
You need to create a trend expression that displays the increase and decrease in the SalesAmount measure for the current DimTime member, irrespective of the level of the Calendar hierarchy.
Which expression should you use?
A.
Case When [SalesMeasures].[SalesAmount]> [SalesMeasures].[SalesAmount],[DimTime].[Calendar].PrevMember Then1 When [SalesMeasures].[SalesAmount]< [SalesMeasures].[SalesAmount],[DimTime].[Calendar].PrevMember Then -1 End
B.
Case When [SalesMeasures].[SalesAmount],[DimTime].[Calendar]< [SalesMeasures].[SalesAmount],[DimTime].[Calendar].PrevMember Then1 When [SalesMeasures].[SalesAmount],[DimTime].[Calendar]> [SalesMeasures].[SalesAmount],[DimTime].[Calendar].PrevMember Then -1 End
C.
Case When [SalesMeasures].[SalesAmount]> [SalesMeasures].[SalesAmount],[DimTime].[Calendar].NextMember Then1 When [SalesMeasures].[SalesAmount]< [SalesMeasures].[SalesAmount],[DimTime].[Calendar].NextMember Then -1 End
D.
Case When [SalesMeasures].[SalesAmount]< [SalesMeasures].[SalesAmount],[DimTime].[Calendar].NextMember Then1 When [SalesMeasures].[SalesAmount]> [SalesMeasures].[SalesAmount],[DimTime].[Calendar].NextMember Then -1 End