2011-09-22 148 views
0

我有以下层次:OLAP - 水平具有相同的名称

<Dimension name="Locations"> 
<Hierarchy hasAll="true" allMemberName="All Locations" primaryKey="loc1Id" uniqueKeyLevelName="loc1Id"> 
    <Table name="OLAP_Budget"/> 
    <Level name="location1" column="location1" uniqueMembers="true"/> 
    <Level name="location2" column="location2" uniqueMembers="true" hideMemberIf="IfBlankName"/> 
    <Level name="location3" column="location3" uniqueMembers="true" hideMemberIf="IfBlankName"/> 
</Hierarchy> 

问题:

“LOCATION1”是通过不同的会计年度的出口,并在每个会计不同的孩子年。 我在列中显示“fiscalYear”维度,但是当我选择显示特定财务年度的值时,它会显示所有子财政年度的整体财政年度。

我该如何解决这个问题?

由于提前

+0

您好!你能添加一些截图吗? – Max

回答

0

好,SSAS不知道是什么年和位置之间的关系是 - 这是不应该。通常情况下,你会有一些组合的数据,唯一的方法(除了将年份和位置放置在相同的维度和建立一个用户定义的层次结构,我不会建议,因为它听起来不对),是写你的查询非空。例如:

SELECT 
{ 
    [Measures].[Some Measure]* 
    [Date].[Calendar].[Year].&[2011] 

} ON 0, 
{ 
    [Location].[Location 1].Members 
} ON 1 
FROM [Some Cube] 

显示行上的所有位置,而不管它们是否有数据违反它们。但是,如果其修改为:

SELECT 
{ 
    [Measures].[Some Measure]* 
    [Date].[Calendar].[Year].&[2011] 

} ON 0, 
NON EMPTY { 
    [Location].[Location 1].Members 
} ON 1 
FROM [Some Cube] 

然后你得到它具有数据在2011年这样你可以得到你想要的结果的位置。