Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to avoid loops?


Please help, what to do if this statement appears after reload? "One or more loops have been detected in your database structure." How can I fix this?

13 Replies
tresesco
MVP
MVP

That means your modelling has some circular references. You have to work on the model to remove that circular references.

Not applicable
Author

Hi

to avoid loops ,to change one table as loosely coupled

in document properties-tables-select loosely coupled

or

rename the fileds which is involved in the loop.

we have somany ways to avoid loop ,to check it in help.

nizamsha
Specialist II
Specialist II

rename the unwanted field name in the table     customer as Customer

Not applicable
Author

Hi,

This error is caused by how you design your data model in QlikView. Since the data model in QlikView is bi-directional you have to be careful not to create a data model that is circular. By circular I mean :

For Eg. say there are 3 tables Order, Product & Sales with following columns :

ORDERPRODUCTSALES
Order_idProduct_idSales_id
Product_idSales_idOrder_id
Sales_AmountCust_NameVoucher_no
City_NameCountryQty
StateRefVehicle

In the example, ORDER table is joined to PRODUCT table, PRODUCT tabe is joined to SALES table & SALES is again joined to ORDER table causing a loop. If you select a Product_id (from ORDER table), PRODUCT table will be filtered and then the SALES table will be filtered which in turn will filter the ORDER table again and so on. That is so called loop.

In this case, you can try removing the extra links between the tables which are not required. In the example above, one way to avid loop is to remove the link between SALES & ORDER table by renaming the field Order_id in SALES table.

You can do that by:

1. Renaming the fields

2. Using Qualify

It is always ideal/best practice to have just one key field per table.

Hope this helps!

Not applicable
Author

Hi,

Loops are formed due to the circular references between the tables, you must be aware QlikView joins the tables based on common column names by default, to avoid any unintended joins you may try aliasing the fields which have same name between different tables. Go to tabular view (Ctrl+T) after reloading to check the joins and try to remove the unnecessary joins through aliasing.

If incase you see all the joins are necessary and required, you might need to avoid the circular references through creation of a link table, please fallow the below blog by Stephen Redmond with detailed information on how to create link tables:

Qlik Tips: Rules for creating a Key/Link Table in QlikView

Regards,
Rajesh

Not applicable
Author

Hi,

change your data model or change the name of the fields.

BR, Dragan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Loops can be avoided by using many methods like

Concatenating Tables

Renaming Column names or Qualify

Link Table

Depends on the scenario which method to use.

Regards,

Jagan.

Not applicable
Author

Hi,

Loops or circular references detected when you have alternative paths between two tables. To resolve them

1.) Rename the Fields

Not applicable
Author

Hi,

To avoid loops don't keep the same fields in more than one table. If you require all the fields then use with the different name or remove the fields. and also you can use qualify and unqualify before the fields in the  load statement