为什么数量不按维度分组?

发布于 2025-01-12 00:00:02 字数 458 浏览 2 评论 0原文

很简单的问题。

我在 Visual Studio 中为 SQL Server Analysis Services 创建了一个多维模型。但我不明白为什么我的数据模型中的关系不起作用。

例如 这就是关系的样子

查看数据关系模型

销售与 [WWI 上的 Item-Current] 相关库存商品 ID]

应该可以。

但是,当我尝试通过 [Items-Current].[Color] 计算 [Sales].[Quantity] 时,我得到了错误的结果。

看到错误的结果

我做错了什么?

谢谢。

Very simple question.

I have created a multi-dimensional model for SQL Server Analysis Services in Visual Studio. But I can't get why my relations in data model don't work.

For example
this is how relations look like

see data relations model

Sales is related to Item-Current on [WWI Stock Item ID]

It should work.

But when I try to calculate [Sales].[Quantity] by [Items-Current].[Color], I get a wrong result.

see wrong result

What did I do wrong?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

习惯成性 2025-01-19 00:00:02

我认为问题在于您的维度键与用于将其与事实链接的键不同(维度键 = 库存项目键,用于与事实链接的维度属性:WWI 库存项目 ID)。这就是它无法正确链接的原因。您可以通过两种方式解决此问题:

1 将 WWI Stock Item ID 设置为维度的主键
2 在维度属性关系中,将颜色属性连接到WWI Stock Item ID,并删除颜色和Stock Item Key之间的关系)

I think that the issue is that your dimension key is different than the key used to link it with the fact (Dimension Key = Stock Item Key, Dimension attribute that is used to link with fact: WWI Stock Item ID). That is why it is not linking properly. you can solve this in 2 ways:

1 Make WWI Stock Item ID your dimension's primary key
2 In the dimension attribute relationships, connect the color attribute to WWI Stock Item ID and remove the relationship between color and Stock Item Key)

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