Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Duplicate Data

Hello Folks.  I am getting the following situation in qlikview data:
  1.png
 
As you can see the product id of 1 is somehow looping after first record and creating extra records.   This shouldn’t be the case and only the first record should be visible

Source of Data is MS DB and this what it looks like; with only 77 records

2.png

My load script looks as following :

3.png

After I run my script I get the following message:

One or more loops have been detected in your database structure. Loops may cause ambiguous results and
should therefore be avoided. QlikView will cut the loop(s) by setting one or more tables as loosely coupled. Settings for loosely coupled tables can be modified after script execution in the tables page of the document properties dialog.

Now when  I go to the Settings > Document Properties > Tables, I see as following ;

4.png

When I attempt to click on Loosely Coupled for Products and save and return.  I get the message “object
out of memory”.

Even when I deleted the data and then click on this setting and loaded the data, I still get the message object out of memory.  I am using my personal laptop with 2gb ram.

Also following is what my internal and external table structure looks like:

INTERNAL LAYOUT;

5.png

EXTERNAL LAYOUT:

6.png

Could someone please let me know how to remove those duplicates either during the load script or after loading?

Thank you in advance for your helpl

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

I can see the UnitPrice field in 2 tables

1.Products

2.OrderDetails

Try renaming the fields or use qualify. Dont use same name until it serves as key between two tables.

FYI:

Hope you know Qlikview makes a join between 2 tables if field name is same.

View solution in original post

4 Replies
denwo2010
Creator
Creator

You will need to put the following above the Office$ load script: QUALIFY *; UNQUALIFY Office;

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

I can see the UnitPrice field in 2 tables

1.Products

2.OrderDetails

Try renaming the fields or use qualify. Dont use same name until it serves as key between two tables.

FYI:

Hope you know Qlikview makes a join between 2 tables if field name is same.

Not applicable
Author

I Took the suggestion from Celambarasan it worked well for me.  The suggestion from Dennis was also good, however it added the product name in front of every field e.g. product.prduct_id so I got concerned as to how the tables will get linked since in qlikview the links between table happen based on field name.  Again, thank you for all your help.  Great place.

swuehl
MVP
MVP

Please check Henric's blog post for a detailed explanations of your issue:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/06/25/circular-references

I think you can see two circular references / loops in your model:

1) Orders - Shippers - Customers

I would consider renaming field CompanyName in Shippers table to ShippersCompanyName

2) Orders - Customers - Office - Employee

Here, you are using a common Office table for Customers and Employees, which is causing a loop. Consider creating two tables CustomerOffice and EmpoyeeOffice

As Celambarasan mentioned, you are also creating a syn key by the two key fields ProductID and UnitPrice. This is probably not causing the issue you are seeing, but consider using the UnitPrice only in one of your tables.

Hope this helps,

Stefan