Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm having an issue were data is duplicating. In the table below, my employee "John" has customers "Ace Plumbers" and "Jones Bros". Ace Plumbers should only show a Copper Tee, and Jones Bros should only show a PVC Elbow. But each customer's order is combining and showing up for the other customer. Ace Plumbers should only be OrderID 1, and Jones should only be OrderID 10. I have tried different things in my load statement to try and figure it out, but I'm not having any luck. I know it's probably something simple, but I'm out of ideas. I have attached my sample qvw and xls files for reference.
Thanks in advance to anyone who can help me out!
Hi,
Unfortunately, you have a problem in your model. In the MainData Table, you have an association between Employee and Customer, with two records for employee John (one linking John with customer Ace Plumbers and one linking John with customer Jones Bros). The Details table is linked with the MainData table only via the EmpID field. This will force Qlikview to perform a cartesian product between the tables.In other words, each EmpID 0001 in Details table will associate with each 0001 EmpID on the MainData Table.
One solution to this problem is to create a field in both tables, concatenating EmpID and CustName.
Eduardo
Hi,
Looking at your script again, I saw that you had tried the solution, but the UniqueKey field (which is the concatenated field) is commented out from the script. Try to comment EmpID and uncomment UniqueKey, in the Details load.
Eduardo
Hi Eduardo,
No luck commenting EmpID, and uncommenting UniqueKey. It leaves the EmpName and CustName fields blank in the Details table.
Thanks,
Rich