答案 0 :(得分:0)
如果您需要以编程方式返回7天,那么您可以将lag
函数应用于日期成员的末尾:
[Date time Online].[Date Key].&[201602152300].lag(7)
如果您需要将now()
提供给mdx脚本,则此模式很有用:
WITH
MEMBER [Measures].[Key for Today] AS
Format
(
Now()
,'yyyyMMdd'
)
MEMBER [Measures].[Today string] AS
'[Date].[Calendar].[Date].&[' + [Measures].[Key for Today] + ']'
SET [Today] AS
StrToMember
(
[Measures].[Today string]
,constrained
)
...