I have a Cube
with a Date dimension hierarchy
(Calendar,Year,Month,Week,Day) and Measure as SalesData
, would like to add a calculated measure which would give me the SalesData
for the selected date and the last date of the Previous Month.
Calendar Hierarchy is as follows
Date - Dimension
Calendar - Hierarchy
Year - [Date].[Calendar].[Year]
Quarter - [Date].[Calendar].[Quarter]
Month - [Date].[Calendar].[Month]
Week - [Date].[Calendar].[Week]
Day - [Date].[Calendar].[Day]
Measures [Sales]
New Calculated Member need to be created - say [SalesMTD] Requirement is when a user select any date say 3 March 2016, the calculated member should give Sales as follows
[SalesMTD] = [Sales] on 3 March 2016 - [Sales] on 29 Feb 2016
Can someone please help me write an MDX query
for the Calculated Measure ?
Your help much appreciated.