我正在尝试在ssas计算选项卡中为QTD,YTD和MTD编写MDX查询,但这些查询不起作用,当我将数据过滤到ssas cube或excel文件时显示#Value!措施。我在下面提到的MDX查询。
CREATE MEMBER CURRENTCUBE.[Measures].YTDSales as
SUM
(
YTD([Dim Date].[Calendar Year].[Calendar Year]),
[Measures].[Sales Amount - Fact Internet Sales]
)
,FORMAT_STRING = "#,##0.00;-#,##0.00"
,VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].QTDSales as
SUM
(
QTD([Dim Date].[Calendar Quarter].[Calendar Quarter]),
[Measures].[Sales Amount - Fact Internet Sales]
)
,FORMAT_STRING = "#,##0.00;-#,##0.00"
,VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].MTDSales as
SUM
(
MTD([Dim Date].[English Month Name].[English Month Name]),
[Measures].[Sales Amount - Fact Internet Sales]
)
,FORMAT_STRING = "#,##0.00;-#,##0.00"
,VISIBLE = 1;
答案 0 :(得分:1)
[Dim Date]。[Calendar Year]。[Calendar Year] 是一个级别,根据您要传递成员的文档。可能你的意思是 YTD([Dim Date]。[Calendar Year] .CurrentMember)。