我是 Qlikview 的新手,我正在尝试获得链接超过 3 个事实表的解决方案,我使用了“在 Qlikview 中处理多个事实表”的方法,并且效果很好,但是当我尝试链接第三个表我收到未找到表的错误。我有 3 个事实表:
- 历史数据
- 销售量
- 信用备忘录
他们都共享必须的领域:
"Document No_",
"Sell-to Customer No_",
Type,
"No_",
Quantity,
Amount,
"Bill-to Customer No_",
"Posting Date"
我已经按照步骤 1 和 2
- 创建临时事实表:(加载所有字段)
- 连接您的密钥并删除单个密钥:
我的疑问是我在哪里添加新的串联?
这是一个例子:
通过将您的各个键连接到一个表中来创建您的链接表:这适用于事实表 1 和 2:
[Temp_Link_Table]:
LOAD DISTINCT
'DocNum,
'Cusnum,
'SKU,
'Bill2Num,
Quantity,
Amount,
"Posting Date"
RESIDENT [Temp_Sales_Line] ;
CONCATENATE ([Temp_Link_Table])
LOAD DISTINCT
DocNum,
Cusnum,
SKU,
Quantity,
Amount,
"Posting Date"
RESIDENT [Temp_Hist_Sales];
我应该如何连接3?
CONCATENATE ([Temp_Link_Table])
LOAD DISTINCT
DocNum,
Cusnum,
SKU,
Quantity,
Amount,
"Posting Date"
RESIDENT [Temp_Credit_Memo]?????????????????????????????????
/**
* The final Link Table will contain all of the individual keys one time as well as your concatenated keys
*/
[Link_table]:
LOAD DISTINCT
"Posting Date",
DocNum,
Cusnum,
SKU,
Quantity,
Amount,
DocNum &'_'&Cusnum &'_'& SKU &'_'& Bill2Num &'_'& Quantity &'_'&Amount &'_'&[Posting Date] AS Sales_Key,
DocNum &'_'&Cusnum &'_'& SKU&'_'& Quantity &'_'&Amount &'_'&[Posting Date] AS Hist_Sales_Key,
DocNum &'_'&Cusnum &'_'& SKU &'_'& Bill2Num &'_'& Quantity &'_'&Amount &'_'&"Posting Date" AS CreditMemo_Key
RESIDENT [Temp_Link_Table];
DROP TABLE [Temp_Sales_Line];
DROP TABLE [Temp_Hist_Sales];
DROP TABLE [Temp_CM];
DROP TABLE [Temp_Link_Table];