SSRS MDXWhere 子句问题
我在 MDX-Query
方面遇到了一些问题。
我想显示所有索赔成本,按类型和特定文档类型划分。
这是我的代码:
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
我只想显示前三个文档类型的数据。
我尝试了以下Where-Clause:
where
(
( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
,( {[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&[3]} )
)
但它只显示了Documenttype 1和3的数据,而不是1到3。
有人可以帮助我吗?
非常感谢你,并对我的英语不好表示歉意!
亚历克斯
I have a little Problem with a MDX-Query
.
I want show all the Claim Costs, divided in Types and with a certain DocumentType.
Here is my Code:
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]
)
I have four Document Types: 1 - 4
I want to show only the data of three first Documenttypes
.
I tried the following Where-Clause:
where
(
( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
,( {[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&[3]} )
)
But it shows me only the Data of the Documenttype 1 and 3, not 1 to 3.
Can anybody help me?
Thank you very much and sorry for my bad English!
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许 [Document Type] 属性的 OrderBy 属性不等于“Key”?在这种情况下需要使用
Maybe the OrderBy property of [Document Type] attribute is not equal to "Key"? In this case it is necessary to use
在下面的条件下,
即使下面的表达式也应该起作用,因为这是一个范围运算符。
浏览此维度和属性的多维数据集时需要检查的内容
[Claim Document Type].[Document Type]
维度 KEY 顺序是否类似于或
如果您看到顺序 1,3 并且您输入1:3 你不会得到 2。所以看看顺序,然后修改你的范围表达式。
早期的解决方案也可以工作,但是如果有很多成员,那么将所有这些成员包含到集合中是不切实际的。
In the below condition
even the following expression should work as this is a range operator.
What you need to check when you browse cube for this dimension and attribute
[Claim Document Type].[Document Type]
does the Dimension KEY order look likeor
If you see order 1,3 and if you enter 1:3 you would not get 2. So look at order and then modify your range expression.
Earlier solution would also work but what if there are lot of member then it is not practical to include all of such members into set.