问题描述
与多维数据集一样,用户希望将不适合层次结构的内容分层显示.他们希望将天>周>月>季度>年"作为层次结构,但周的问题是它们可以是1-2个月的一部分,而不仅仅是1个月(并且延伸为2个季度,学期的一部分,年).
As is usual with cubes, the users want things that don't fit into a hierarchy to be displayed hierarchically. They'd like to see Day > Week > Month > Quarter > Year as the hierarchy, but the problem with weeks is they can be part of 1-2 months, not just 1 month (and by extension part of 2 quarters, semesters, years).
所以我的问题是:如何建立属性关系,以及如何建立层次结构?这是我所拥有的,但我知道这不是最佳选择.
So my question is: how to set up the attribute relationships, and how to set up the hierarchy? Here is what I have, but I know it's not optimal.
层次结构(周期==星期):
Hierarchies (cycle == weeks):
属性关系:
没有周期->年,因为它是多对多的关系
推荐答案
有四种类型的星期需要关注自己:
There are four types of weeks to concern yourself with:
-
年度最佳(1-53).层次结构:年>周
Week of Year (1-53). Hierarchy: Year > Week
您应该决定是希望第1周从1月1日开始还是遵循 ISO标准
You should decide whether you want Week 1 to begin on Jan 1, or follow the ISO standard
本周(1-5).层次结构:年[>季度]>月>周
Week of Month (1-5). Hierarchy: Year [> Quarter] > Month > Week
您应该决定是要第1周在每月的第一天还是该月的第一个星期日/星期一开始.
You should decide whether you want Week 1 to begin on the first day of the month, or the first Sunday/Monday of the month.
会计年度周(1-53).层次结构:会计年度>周
Week of Fiscal Year (1-53). Hierarchy: Fiscal Year > Week
财政月周(1-5).层次结构:会计年度[>季度]>月份>周
Week of Fiscal Month (1-5). Hierarchy: Fiscal Year [> Quarter] > Month > Week
这篇关于如何将一周纳入日历时间层次结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!