这是我们当前的MTD
计算:
MEMBER [Time Calculations].[Time Calculations].[Calculate MTD] AS
Sum
(
MTD([Date].[Date - Calendar Month].CurrentMember)
,[Time Calculations].[Time Calculations].[Current Value]
)
我在使用范围运算符:
的MTD计算的某个地方看到过。以下是从时间开始的总和:
MEMBER [Time Calculations].[Time Calculations].[Calculate MTD] AS
Sum
(
null: [Date].[Date - Calendar Month].CurrentMember
,[Time Calculations].[Time Calculations].[Current Value]
)
任何人都可以记住如何调整以上内容,以便进行MTD
计算吗?
答案 0 :(得分:1)
如果[Date - Calendar Month]
与Adventure Works的Calendar
层次结构相似,则以下内容可能适合您:
MEMBER [Time Calculations].[Time Calculations].[Calculate MTD] AS
Sum
(
[Date].[Date - Calendar Month].CurrentMember.firstsibling
:
[Date].[Date - Calendar Month].CurrentMember
,[Time Calculations].[Time Calculations].[Current Value]
)