您好我正在尝试在 MDX 查询中放置一个动态日期过滤器(如今天的日期),但我无法从查询中获得任何结果,有人可以帮助检查我的查询有什么问题吗?
我首先用指定的日期值测试了 MDX 查询,查询是
WITH MEMBER [Yesterday] AS VBAMDX.Format(VBAMDX.Now()-1,"MM/dd/yy")
select {[Measures].[Order Root Total], [Measures].[Yesterday]} on columns,
filter ([D Date].[DAY ID].&[09/19/13],
[Measures].[Order Root Total]>0) on rows
from [Root Product Profit and Sales]
它返回结果
Order Root Total Yesterday
09/19/13 1481.2225483463 09/19/13
然后我尝试了:
WITH MEMBER [Yesterday] AS VBAMDX.Format(VBAMDX.Now()-1,"MM/dd/yy")
select {[Measures].[Order Root Total], [Measures].[Yesterday]} on columns,
filter ([D Date].[DAY ID].&[Yesterday],
[Measures].[Order Root Total]>0) on rows
from [Root Product Profit and Sales]
然后我什么都不回。。
有人可以帮帮我吗!非常感谢!!!