我对MDX-Query有点小问题。
我想要显示所有索赔成本,划分为类型和特定的DocumentType。
以下是我的代码:
select
{
[Measures].[Claim Count],
[Measures].[Claim Cost Position Count],
[Measures].[Claim Cost Original],
[Measures].[Claim Cost Original Average],
[Measures].[Claim Cost Possible Savings],
[Measures].[Claim Cost Possible Savings Average],
[Measures].[Claim Cost Possible Savings Percentage]
} on 0,
NON EMPTY{
[Claim Cost Type].[Claim Cost Type].[Claim Cost Type].Members
} on 1
from
Cube
where
(
( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
,[Claim Document Type].[Document Type].&[1]
)我有四种文档类型:1-4
我只想显示三个第一个Documenttypes的数据。
我尝试了以下Where-Clause:
where
(
( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
,( {[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&[3]} )
)但是它只显示了DocumentType1和3的数据,而不是1到3。
有人能帮我吗?
非常感谢并为我糟糕的英语感到抱歉!
亚历克斯
发布于 2011-06-16 19:40:20
是否单据类型属性的OrderBy属性不等于"Key"?在这种情况下,有必要使用
{[Claim Document Type].[Document Type].&[1],
[Claim Document Type].[Document Type].&[2],
[Claim Document Type].[Document Type].&[3]}发布于 2011-06-17 10:48:46
在下面的条件下
where
(( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } ),( {[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&[3]} ))甚至下面的表达式也应该可以工作,因为这是一个范围运算符。
({[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&3]})在浏览此维度和属性的多维数据集时需要检查哪些内容[Claim Document Type].[Document Type]维键顺序看起来像什么
[Claim Document Type].[Document Type].&[1]
[Claim Document Type].[Document Type].&[2]
[Claim Document Type].[Document Type].&[3]或
[Claim Document Type].[Document Type].&[1]
[Claim Document Type].[Document Type].&[3]
[Claim Document Type].[Document Type].&[2]如果你看到1,3阶,如果你输入1:3,你不会得到2。所以看看你的阶,然后修改你的范围表达式。
早期的解决方案也可以,但是如果有很多成员,那么将所有这样的成员都包含到集合中是不现实的。
https://stackoverflow.com/questions/6370798
复制相似问题