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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

circular references - error in script!

Hi everyone,

I am getting circular ref/loops in my script, I'm looking to join 2 tables which I have attached, so that I can have a unit, dept, team hierarchy. However, most tabs in my script have this and trying the new join creates these loops.

If anyone could help it would be much appreciated as it is quite urgent.

Regards

6 Replies
Not applicable
Author

Why do you CONCATENATE three different tables? 😉

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

That document is not very helpful to me - it is a snippet of a script with no context/data to relate to. Sorry.

In general, a circular reference is created when a field in Table A associates to a field in Table B, a different field associates from Table B to Table C and another field associates from Table C to Table A (there may be many more tables involved).

The simple way to solve this problem is to look at your associations and decide if one of them is either completely incorrect, or just not relevant for your document.

If you find that you need all of them then you need to look at creating a key table to associate all the data.

Regards,

Stephen

Not applicable
Author

I believe that all the associations are necessary. Will a key table remove the circular references? What way would I go about creating such a table? I appreciate your help.

stephencredmond
Partner - Specialist II
Partner - Specialist II

In simple terms, you alias all your foreign keys to prevent the associations then you create a table, using a combination of Resident, Join and Concatenate, containing all the Primary keys that are associated to each other. You end up with a star schema.

I can't give you specific instructions on your document because I don't have a copy of it - that might be beyond the scope of a forum like this anyway!

Regards,

Stephen

stephencredmond
Partner - Specialist II
Partner - Specialist II

I have posted a Wiki entry on strategy for creating Key tables:

http://community.qlik.com/wikis/qlikview-wiki/strategy-for-creating-key-tables.aspx

Not applicable
Author

Thanks Stephen,

I'll give that a try!