我需要使用 SalesAmount 获取日期范围的 LastSalesDate。但以下 MDX 未按日期范围过滤。其他数据正常。
WITH MEMBER [Measures].[MaxSaleDate]
AS
TAIL(
FILTER(
[Date—Date].[Date].MEMBERS,
NOT ISEMPTY([Measures].[Sales])
)
).ITEM(0).NAME
SELECT { [Measures].[MaxSaleDate], NONEMPTY([Measures].[Sales]) } ON COLUMNS,
{ [Store—Store].[Store].MEMBERS * [Store-NoOfDaysSales].[NoOfDays].MEMBERS } ON ROWS
FROM ( SELECT (
[Date—Date].[All Date—Date].[2012-10-14 00:00:00.000] :
[Date—Date].[All Date—Date].[2012-11-14 00:00:00.000]
) ON COLUMNS
FROM [Sales])
谢谢。非常感谢您的帮助。