在一起
我目前面临着在数据模型(Powerpivot)中以某种方式连接不同粒度的挑战。
我在产品层面上的销售数据如下:
ID - Date - Value - State
ID: 123A
Date: 01.01.2019
Value: 5000
State: 10
我的年度目标表结构如下:
Area - Category - Month - Goal
Area: A
Category: A1
Month: 01.01.2019
Goal: 1.000.000
产品将被分配到该类别。
所以:
Category - ID
A1 - 123A
A1 - 124A
A2 - 125A
....
如何连接这些表"Professional“,以便在我的透视表中显示它们,如下所示
Area - Category - Sales - Goal
向Joshua致以最良好的问候
发布于 2019-06-29 00:58:09
我认为您需要一个类似于此的数据模型,其中Dates
是您的日程表:
关系在哪里?
Categories[ID] --> Sales[ID]
Categories[Category] --> Goals[Category]
Dates[Date] --> Sales[Date]
Dates[Month] --> Goals[Month]
请注意,右侧有多对多关系。这些相当于在它们之间有一个唯一的列桥接表。
Categories[Category] * <-- 1 CategoryBridge[Category] 1 --> * Goals[Category]
Dates[Month] * <-- 1 MonthBridge[Month] 1 --> * Goals[Month]
https://stackoverflow.com/questions/56809965
复制相似问题