Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
BrianDH
Creator II
Creator II

How-To Link together to QVDs.

Team I have two QVD files with matching keys.  How can I link them so as to access fields from one to the other? 

1 Solution

Accepted Solutions
treysmithdev
Partner Ambassador
Partner Ambassador

You can load both QVDs and link them in a data model by naming a field the same, which links the two internal tables.

 

For example:

Sales:
Load
    InvoiceId&'|'&ProductId as %SalesKey // Links to Discount
    InvoiceId,
    ProductId as %ProductId, // Links to Product
    Date,
    Qty,
    Amount
From
    [lib://QVD/Sales.qvd];

Discount:
Load
    InvoiceId&'|'&ProductId as %SalesKey // Links to Sales
    DiscountDesc,
    DiscountPercentage
From
    [lib://QVD/Discount.qvd];

Product:
Load
    %ProductId, // Links to Sales Table
    ProductId,
    ProductName,
    ProductCode,
    ProductCategory
From
    [lib://QVD/Product.qvd];

 

Blog: WhereClause   Twitter: @treysmithdev

View solution in original post

2 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

You can load both QVDs and link them in a data model by naming a field the same, which links the two internal tables.

 

For example:

Sales:
Load
    InvoiceId&'|'&ProductId as %SalesKey // Links to Discount
    InvoiceId,
    ProductId as %ProductId, // Links to Product
    Date,
    Qty,
    Amount
From
    [lib://QVD/Sales.qvd];

Discount:
Load
    InvoiceId&'|'&ProductId as %SalesKey // Links to Sales
    DiscountDesc,
    DiscountPercentage
From
    [lib://QVD/Discount.qvd];

Product:
Load
    %ProductId, // Links to Sales Table
    ProductId,
    ProductName,
    ProductCode,
    ProductCategory
From
    [lib://QVD/Product.qvd];

 

Blog: WhereClause   Twitter: @treysmithdev
BrianDH
Creator II
Creator II
Author

TY