【发布时间】:2019-08-20 08:43:00
【问题描述】:
我想在我们的多维数据集中使用 MDX 函数 openingperiod() 和 closingperiod(),但无法使其正常工作。
这真的可能吗,还是这些功能仅适用于 MDX 查询?
我用来了解openingperiod()的主要两篇文章是: https://www.sqlservercentral.com/steps/stairway-to-mdx-level-12-mdx-timedate-series-functions-openingperiod-and-closingperiod-functions
https://docs.microsoft.com/en-us/sql/mdx/openingperiod-mdx?view=sql-server-2017
在上述文档中,openperiod() 和 closingperiod() 这两个函数只在查询中使用,但我想将它们集成到多维数据集中。
我用作常规查询的代码是:
sum(
openingperiod
(
[Date Booking].[Year Month],
[Date Booking].[Year Month].currentmember
),
[Measures].[Goods Amount])
结果应该是月初的商品数量,结果却是NULL。
我使用sum 来获得指向正确成员的有效语法。
【问题讨论】:
标签: visual-studio ssas mdx cube