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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

link 2 filed in a document

Hi due to circular problem , i hab  set 2 filed for customer number one for invoices( CUSTINVNO) and one for orders( CUSTORDNO)  , in same sheet i need to have 2 objects , one to evalute orders and other to evalute invoices , when i select to the filed  CUSTINVNO with certain value i want that the filed CUSTORDNO wil perform the same selection , ( like if they were same filed )  is it possible ? , many thanks for your help gidon

1 Solution

Accepted Solutions
Jason_Michaelides
Partner - Master II
Partner - Master II

Circular references usually occur when you have more than one fact table that both link to the same dimension and also have a common field themselves.  The best way to avoid this is to join the fact tables together using Concatenate().  In your case, try:

Customers:

LOAD

     CUSTNO,

     Field2,

     Field3,

     etc

FROM Customers...;

Fact:

LOAD

     'Order'     AS     FactType,

     CUSTNO,

     Field2,

     Field3,

     OrderDate     AS     Date,

     etc

FROM Orders...;

CONCATENATE (Fact)

LOAD

     'Invoice'     AS     FactType,

     CUSTNO,

     Field2,

     Field3,

     InvoiceDate     AS     Date,

     etc

FROM Invoices...;

Now you only have one fact table but can separate the types with FactType.  CUSTNO is now the same field.

Hope this helps,

Jason

View solution in original post

3 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Circular references usually occur when you have more than one fact table that both link to the same dimension and also have a common field themselves.  The best way to avoid this is to join the fact tables together using Concatenate().  In your case, try:

Customers:

LOAD

     CUSTNO,

     Field2,

     Field3,

     etc

FROM Customers...;

Fact:

LOAD

     'Order'     AS     FactType,

     CUSTNO,

     Field2,

     Field3,

     OrderDate     AS     Date,

     etc

FROM Orders...;

CONCATENATE (Fact)

LOAD

     'Invoice'     AS     FactType,

     CUSTNO,

     Field2,

     Field3,

     InvoiceDate     AS     Date,

     etc

FROM Invoices...;

Now you only have one fact table but can separate the types with FactType.  CUSTNO is now the same field.

Hope this helps,

Jason

gidon500
Creator II
Creator II
Author

Hi Jason , i will try it , so what you say is that i will have one table , that will include both Invoices data and orders data , will this increase the size on my model , as each line the the new table will have lots of empty cells thanks for your fast and professional gidon

Jason_Michaelides
Partner - Master II
Partner - Master II

That's right. It will actually most likely reduce the size of the data model. QlilView stores DISTINCT values of each field just once, no matter what tables they are in. This way you only have one field CUSTNO, not 2. Empty fields won't matter.