Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Why do you CONCATENATE three different tables? 😉
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
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.
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
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
Thanks Stephen,
I'll give that a try!