Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 使用CurrentMember时在筛选器上获得不同的结果。轴心国问题?_Sql Server_Mdx_Business Intelligence - Fatal编程技术网

Sql server 使用CurrentMember时在筛选器上获得不同的结果。轴心国问题?

Sql server 使用CurrentMember时在筛选器上获得不同的结果。轴心国问题?,sql-server,mdx,business-intelligence,Sql Server,Mdx,Business Intelligence,我从事教育工作,我正在努力寻找一个学生毕业的术语——或者用大学的术语——被授予的名称 如果我使用下面的MDX,我会得到正确的结果,正好是去年秋天 select filter( [Term].[Term].[Term], ( [Student].[Student].[Student Dimension Type].&[Student].&[123456], [Measures].[Degree Conferred Count]

我从事教育工作,我正在努力寻找一个学生毕业的术语——或者用大学的术语——被授予的名称

如果我使用下面的MDX,我会得到正确的结果,正好是去年秋天

select 
filter(
    [Term].[Term].[Term],
    (
        [Student].[Student].[Student Dimension Type].&[Student].&[123456],
        [Measures].[Degree Conferred Count]
    ) > 0
) on 0
from [Enrollment Analytics]
如果我将显式学生成员与currentmember交换,并将学生放在另一个轴上,我将得到过去两年的秋季、夏季和春季

select 
    filter(
        [Term].[Term].[Term],
        (
            [Student].[Student].currentmember,
            [Measures].[Degree Conferred Count]
        ) > 0
    ) on 0,
    [Student].[Student].[Student Dimension Type].&[Student].&[123456] on 1
from [Enrollment Analytics]

如果有人有时间的话,你能解释一下这两条语句是如何被不同地处理的吗?谢谢

在处理轴0时,我想还有[Student].currentMember,因此将使用此层次结构的.defaultMember;因此,您将获得一个基于该默认成员值的过滤器集

我认为添加where子句(即定义当前成员):


是您要查找的对象。

在处理轴0时,我想还有[Student].currentMember,因此将使用此层次结构的.defaultMember;因此,您将获得一个基于该默认成员值的过滤器集

我认为添加where子句(即定义当前成员):

这就是你要找的

where [Student].[Student].[Student Dimension Type].&[Student].&[123456]