SSAS-> AdventureWorks 示例 ->使用浏览器按周拼接一个度量,显示的结果有两条同一周的记录?
我一直在研究一个多维数据集,并注意到当我按几周浏览多维数据集中的度量时,我得到了意想不到的结果,但首先让我显示我当前的场景。我正在按周查看事实负载的计数。当我这样做时,我会得到这样的结果。 :
Weeks | Fact Internet Sales Count
2001-07-01 00:00:00.000 | 28
2001-07-08 00:00:00.000 | 29
....等等,正如您所期望的那样。
再往下我注意到了这一点。 :
2001-09-30 00:00:00.000 | 10
2001-09-30 00:00:00.000 | 24
正如您所看到的,它以不同的计数显示了一周两次,当您将这些计数加在一起时,它就是本周的正确计数(即 34)。
我只是很困惑为什么它显示两周,当我查看 sql 中的数据时,我可以看到这两者之间的数据差异严格来说是这些日期所在的月份(最早的月份是 10 个月,后面的月份是 24 月份)任何示例中的月份)。
我最初在我自己创建的原始立方体中看到了这一点,反过来,我拉出了值得信赖的 AdventureWorks 练习立方体,发现它也存在于该立方体中。
I have been working on a cube and noticed that when I am browsing measures in my cube by weeks, I am getting an unexpected result, but first let me display my current scenario. I am looking at counts of a fact load by weeks. When I do so I am getting results like these. :
Weeks | Fact Internet Sales Count
2001-07-01 00:00:00.000 | 28
2001-07-08 00:00:00.000 | 29
....and so on as you would expect.
Further down I noticed this. :
2001-09-30 00:00:00.000 | 10
2001-09-30 00:00:00.000 | 24
As you can see, it shows the week twice with different counts, when you add these counts together it is the correct number of counts for this week (i.e. 34).
I am just confused why it is showing two weeks, when I look at the data in sql I can see that the difference in data between these two is strictly the month in which these dates fell (10 in the earliest month and 24 and the later month in any example).
I initially saw this in my original cube that I created on my own, in turn, I pulled up trusty adventureWorks practice cube and found that it was present in that cube also.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是因为在该日期层次结构中,层次结构中最低的属性是日期而不是星期。因此,按日期划分总是有几周的时间间隔。通过创建以周作为日期层次结构的最低部分的日期层次结构,可以缓解这一问题。
This is due to the fact that within this date hierarchy, the lowest attribute in the hierarchy was date not week. Therefore, there was always a split for weeks by date. This can be alleviated by making a date hierarchy with week as the lowest portion of a date hierarchy.