SSAS-> AdventureWorks 示例 ->使用浏览器按周拼接一个度量,显示的结果有两条同一周的记录?

发布于 2024-12-28 16:59:09 字数 612 浏览 2 评论 0原文

我一直在研究一个多维数据集,并注意到当我按几周浏览多维数据集中的度量时,我得到了意想不到的结果,但首先让我显示我当前的场景。我正在按周查看事实负载的计数。当我这样做时,我会得到这样的结果。 :

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

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

发布评论

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

评论(1

征﹌骨岁月お 2025-01-04 16:59:09

这是因为在该日期层次结构中,层次结构中最低的属性是日期而不是星期。因此,按日期划分总是有几周的时间间隔。通过创建以周作为日期层次结构的最低部分的日期层次结构,可以缓解这一问题。

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.

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