SSAS - 具有“一个”表的多对多维度

时间:2021-11-04 09:50:13

I have an organization table and an organization membership table

我有一个组织表和一个组织成员资格表

Org table: |OrgId|Name|...|

组织表:| OrgId |名称| ... |

Org membership table: |MembershipId|Parent organization id|Child organization id|

组织成员资格表:| MembershipId |父组织ID |子组织ID |

This describes an org structure where one organization can be a child of several parent organizations, the parent organizations may in their turn be children of other parents.

这描述了一个组织结构,其中一个组织可以是几个父组织的孩子,父组织可以反过来成为其他父母的孩子。

There are no circular references like o1 is child of o2 that is child of o1.

没有像o1那样的循环引用是作为o1的孩子的o2的孩子。

I am struggling to model this as a dimension in SSAS. Is it possible?

我正在努力将其建模为SSAS中的一个维度。可能吗?

1 个解决方案

#1


You are effectively trying to model multiple hierarchies in a single parent child dimension. You need to create a normal dimension out of the Org table, a parent child dimension out of the Org membership table and a new intermediate measure group linking the two Org table to the Org membership table.

您正在有效地尝试在单个父子维度中建模多个层次结构。您需要从Org表中创建一个普通维度,从Org成员资格表中创建一个父子维度,以及一个将两个Org表链接到Org成员资格表的新中间度量值组。

To save copying all Marco's copyrighted content here, go read The many-to-many revolution and lookup the "Multiple Hierarchies" section.

要保存复制所有Marco受版权保护的内容,请阅读多对多革命并查找“多个层次结构”部分。

#1


You are effectively trying to model multiple hierarchies in a single parent child dimension. You need to create a normal dimension out of the Org table, a parent child dimension out of the Org membership table and a new intermediate measure group linking the two Org table to the Org membership table.

您正在有效地尝试在单个父子维度中建模多个层次结构。您需要从Org表中创建一个普通维度,从Org成员资格表中创建一个父子维度,以及一个将两个Org表链接到Org成员资格表的新中间度量值组。

To save copying all Marco's copyrighted content here, go read The many-to-many revolution and lookup the "Multiple Hierarchies" section.

要保存复制所有Marco受版权保护的内容,请阅读多对多革命并查找“多个层次结构”部分。