Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sharmaKavita
Contributor
Contributor

tried to create link table. is it correct then how to validate it?

WebSales:
LOAD
DateKey,
ProductKey,
// DateKey & ProductKey as ltkey,

CustomerKey,
PromotionKey,
CurrencyKey,
DateKey & ProductKey & CurrencyKey as ltkey,
SaleTypeKey,
OrderDate,
DueDate,
ShipDate,
SalesOrderNumber,
SalesOrderLineNumber,
RevisionNumber,
OrderQuantity,
UnitPrice,
UnitPriceDiscountPct,
ProductStandardCost,
TotalProductCost,
SalesAmount,
TaxAmt,
Freight,
ExtendedAmount
FROM [lib://source/WebSales.qvd]
(qvd);


ProductInventory:
LOAD
ProductKey,
DateKey,
DateKey & ProductKey as ltkey,
UnitCost,
StockOut,
StockOutDate,
StockIn,
StockInDate,
StockOnHand,
StockBackOrderQty,
StockBackOrderDate,
MinStockLevel,
MaxStockLevel,
StockTakeFlag
FROM [lib://source/ProductInventory.qvd]
(qvd);


ForeignexchangeRate:
LOAD
CurrencyKey,
DateKey,
DateKey & CurrencyKey as ltkey,
"Date" as Closedate,
Country,
XRate
FROM [lib://source/ForeignExchangeRates.qvd]
(qvd);

Currency:
LOAD
CurrencyKey,
CurrencyAlternateKey,
CurrencyName
FROM [lib://source/currency.qvd]
(qvd);

 

Labels (2)
2 Replies
Henry_Laser
Contributor
Contributor

Hi,

What script did you use to create your link table? Will this be possible for you to share? Also, You will need at least one dimension in all tables that you want to link, to be the same in naming for this to work correct.

Lokesh_5045
Creator
Creator

From the script that you shared, I guess data gets doubled or may not give correct values. Though the name of the key in all tables is same, it is created with different combination of fields.