Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Circular reference in purchase and sale orders

Hello

I am new in Qlik Sense and in this forum,

I have this situation:

I need to compare sales and purchases orders by product in a time periods (years, months)

I have a table with

Sales:

OrderID,

ProductID,

SalesDate,

....

Purchases:

PurchaseOrderID,

ProductID,

PurchaseDate,

....

I have two Calendar tables (with resident option) and in both of then I have a field Year to try to compare sales and purchases.

However I have a circular reference, I can I resolve it?

Thanks,

9 Replies
srchilukoori
Specialist
Specialist

Hi Pedro,

Try renaming one of the fields, that will clear the circular reference.

Not applicable
Author

Thanks srchilukoori,

My trouble es that when I rename the field (v.g. rename Year like YearPurchase) I cannot do a graphic showing purchases and sales for one year and one product.

srchilukoori
Specialist
Specialist

Pedro,

see if you can create an Island table for time, and use that as a dimension. You would also have to change the calculations.

srchilukoori
Specialist
Specialist

A better alternative is to concatenate the two fields and adding a Table name field to differentiate the data in each table.

Anonymous
Not applicable
Author

Hi Pedro,

Maybe post screenshot of Datamodel from Table viewer,will be easy to help.

qlikviewwizard
Master II
Master II

Hi,Can you provide the whole script or sample file with the data.

It is highly difficult to provide the solution with imagination with your provided information

sll
Employee
Employee

Have you looked at Link tables in Qlik?

http://www.analyticsvidhya.com/blog/2014/12/remove-synthetic-key-concatenation-link-table-qlikview/

As suggested, you can concatenate however that may require you to write customer measures with Set Analysis. Link tables result in cleaner data model as well as easier implementations.

sll
Employee
Employee

Another good Qlik blog post:

Concatenate vs Link Table

Asim