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”维度,但是当我选择显示特定fiscalYear 的值时,它会显示整个fiscalYears 的所有子项。
我该如何解决这个问题?
提前致谢
I have the following Hierarchy:
<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>
The problem:
"location1" is exit through different fiscal Year and has different children in each fiscal year.
I displayed "fiscalYear" dimension in column but when i choose to display values of a specific fiscalYear it display all children overall the fiscalYears.
How can i solve this problem ?
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,SSAS 不知道年份和地点之间的关系 - 而且也不应该知道。通常,您会有某些组合的数据,唯一的方法(除了将年份和位置放置在同一维度并构建用户定义的层次结构之外,我不建议这样做,因为这听起来是错误的),就是用非空。在示例中:
显示行上的所有位置,无论它们是否有数据。但是,如果您将其修改为:
那么您将获得具有 2011 年数据的位置。这样您就可以获得您想要的结果。
Well, SSAS does not know what the relationship between years and locations is - and it is not supposed to. Typically, you'd have data for some combinations and the only way (other than placing Year and Location in the same dimension and building a user-defined hierarchy, which I would not advise as it sounds wrong), is to write your query with NON EMPTY. In example:
shows all Locations on rows, regardless whether they have data against them or not. However, if you modify it to:
Then you get locations which have data in 2011. This way you could get the result you want.