I'm modelling a cube that contains inventory data. For simplicity's sake we are trying to maintain one date dimension. Some of these measures contain the stock level.
The end users are using Excel to view data from analysis services. What I want to do is stop this dimension from showing values where the actual stock transactions end.
There are other measures in the cube that require future information, so removing all date entries in the future is not allowed.
A simplified example measure:
CREATE [Measures].[Quantity On Hand];
SCOPE ([Measures].[Quantity On Hand]);
this = Aggregate(null:[Transaction Date].[Year - Quarter - Month].CurrentMember, [Measures].[Quantity Purchased])
- Aggregate(null:[Transaction Date].[Year - Quarter - Month].CurrentMember, [Measures].[Quantity Sold])
FORMAT_STRING(this) = "#,#.00;-#,#.00; ";
END SCOPE;
The date dimension contains future dates.
Can I make the [Transaction Date]
dimension stop showing information after the last transaction in this measure (Highest Transaction Date in the fact table)?