Ssas 在mdx查询中排除一个月内的几个日期

Ssas 在mdx查询中排除一个月内的几个日期,ssas,mdx,cube,Ssas,Mdx,Cube,下面是我的问题。我在这里的要求是,我想排除几个日期销售在一个特定的月份,而我正在寻找每月的数据 例如:当我查看2008年8月的2008年8月数据时,我不想包括2008年8月15日2008年8月的销售数据 select [Measures].[Internet Sales Amount] on 0,([Product].[Category].&[4], [Date].[Calendar].[Month] )on 1 from [Adventure Works] where [Date].

下面是我的问题。我在这里的要求是,我想排除几个日期销售在一个特定的月份,而我正在寻找每月的数据

例如:当我查看2008年8月的2008年8月数据时,我不想包括2008年8月15日2008年8月的销售数据

select
[Measures].[Internet Sales Amount] on 0,([Product].[Category].&[4], 
[Date].[Calendar].[Month]
)on 1
from [Adventure Works]
where [Date].[Calendar Year].&[2008].

如果你能在这方面提供帮助,我会很合适的

您必须排除Where子句中的成员:

select 
[Measures].[Internet Sales Amount] on 0,
([Product].[Category].&[4],[Date].[Calendar].[Month]) on 1
from [Adventure Works] 
where ([Date].[Calendar Year].&[2008],{[Date].[Day].[Day].Members - [Date].[Day].&[20080815]})

当执行下面的两个查询时,它显示相同的结果。我的意思是被排除在月份之外的日会员从[Adventure Works]中选择0上的[Measures].[Internet Sales Amount],1上的[Product].[Category].[Date].[Calendar].[month]),其中([Date].[Calendar Year].[2008],{[Date].[Date].[Date].[Date].[20080131])选择[Adventure Works]中[Date].[Calendar Year].[2008])的[0、([Product].[Category].[4]、[Date].[Calendar].[Month])上的[Measures].[Internet Sales Amount],您是指[Date].[Date].[20080131]未排除会员价值??能否提供结果截图?加上当天会员价值。是的,2008年1月的当天销售额20080131未排除在外。确定我上传了截图我不确定如何上传图像,但以下结果显示“附件2008年1月$56456.93”对于excludeOkay之前和之后,您确定[Date].[Date].&[20080131]是真正的成员吗?它是否与以下代码一起工作:where([Date].[Calendar Year].&2008],[Date].[Date].[20080815])