我的SSAS维度层次结构未正确显示

时间:2017-11-30 12:43:18

标签: ssas hierarchy cube

我在一个多维立方体中有一个名为Dim_DueAnalysis的维度。

基础表看起来像这样(这里只有一部分数据):

DueAnalysis_Key  DueAnalysisID  DueAnalysisDays    DueAnalysisIntervalWeeks  DueAnalysisInterval   DueAnalysisDueOverdue
1052             26             Overdue by 26 days Overdue by 3 weeks        Overdue by 1-30 days  Overdue
1053             27             Overdue by 27 days Overdue by 3 weeks        Overdue by 1-30 days  Overdue
1054             28             Overdue by 28 days Overdue by 4 weeks        Overdue by 1-30 days  Overdue
1055             29             Overdue by 29 days Overdue by 4 weeks        Overdue by 1-30 days  Overdue
1056             30             Overdue by 30 days Overdue by 4 weeks        Overdue by 1-30 days  Overdue
1057             31             Overdue by 31 days Overdue by 4 weeks        Overdue by 31-60 days Overdue

这张桌子看起来很精致。

我在立方体中的维度有一个层次结构:

Due Analysis Key => Due Analysis Days => Due Analysis Interval Weeks => Due Analysis Interval => Due Analysis Due Overdue
                 => Due Analysis Day Number                          => Due Analysis ID sort

我所有的关系类型都很灵活。但是当我在分析数据库中浏览它时,我的维度仍然是这样的:

Overdue
- Overdue by 1-30 days
  ...
  - Overdue by 3 weeks
    - Overdue by 21 days
      ...
    - Overdue by 27 days
- Overdue by 31-60 days
  - Overdue by 4 weeks
    - Overdue by 28 days
    - Overdue by 29 days
      ...

您可能已经注意到,第28-30天是31-60天。

我想要的是"逾期4周" (第28-30天)在1-30天的层级中处于逾期状态,而未在逾期的31-60天处理。但是"逾期4周"如果在那里存在31-34天,也应该在逾期31-60天内出现。

我认为这只是将我的关系类型设置为"灵活"而不是" Rigid"但这并没有解决我的问题。

我不确定需要哪些进一步的信息来解决这个案例,所以请询问某些属性是如何的。

1 个答案:

答案 0 :(得分:0)

当然啊 - 我必须创建另一个列,指定我的数据所在的周和日间隔。通过使用该列,我的层次结构正确。