OLAP - 级别具有相同的名称

发布于 2024-12-06 03:13:16 字数 701 浏览 0 评论 0原文

我有以下层次结构:

 <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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花想c 2024-12-13 03:13:16

嗯,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 年数据的位置。这样您就可以获得您想要的结果。

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:

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

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

shows all Locations on rows, regardless whether they have data against them or not. However, if you modify it to:

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

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

Then you get locations which have data in 2011. This way you could get the result you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文