为什么数量不按维度分组?
很简单的问题。
我在 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
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.
What did I do wrong?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为问题在于您的维度键与用于将其与事实链接的键不同(维度键 = 库存项目键,用于与事实链接的维度属性: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)