Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Data issue - doubling records

I can't figure out this problem. I have a BegBal table then transform it to to a BegBal2 table. I don't understand but it is doubling up the records.

AgencyAmount Beg Bal
TLS7465.74
M3I164288.34
Key|Agency1Amount Beg Bal
M3I7465.74
M3I164288.34
TLS7465.74
TLS164288.34

BegBal:

LOAD
Agency,
[Amount Beg Bal]
FROM
[..\SourceDocuments\QVD\Layer2\BegBal.qvd]
(
qvd);

BegBal2:
Load
Agency as Key|Agency1,
Resident BegBal;


7 Replies
JonnyPoole
Employee
Employee

it autoconcatenating the tables together into Begbal table. Begbal2 is never created

add 'noconcatenate' before the 2nd table.

But do you still want the 1st ?  it will create an ugly link table between the 2 if you don't drop the first. fyi.

BegBal:

LOAD
Agency,
[Amount Beg Bal]
FROM
[..\SourceDocuments\QVD\Layer2\BegBal.qvd]
(
qvd);


noconcatenate
BegBal2:
Load
Agency as Key|Agency1,
Resident BegBal;

MayilVahanan

Hi

What you are trying to achieve? Could you please explain the scenario?

From your data model, its creating "Cartesian Product". There is no link between BegBal and BegBal2..

In result, it produce the wrong result. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
PrashantSangle

Hi,

I dont think so that nonconcatenate will solve his issue.

Since both table BegBal and BegBal2 are independent table

but when you take this in table box, it will take all possible combination of

Key|Agency1 and [Amount Beg Bal] therefore value is duplicating.

After reloading your script check in table viewer there are two independent table there is no relation between these two table therefore you can see these kind of behaviour.

Create relation between them or create key in main table no need to use resident load.

and there is error in your script you have inserted , after Key|Agency1 just check it.

I hope you understand

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
renjithpl
Specialist
Specialist

Hi Zagzebski,

I think the script is wrong may be you are missing something,

it sshould be like this

LOAD


Agency,
[Amount Beg Bal]
FROM
[..\SourceDocuments\QVD\Layer2\BegBal.qvd]
(
qvd);

BegBal2:
Load
Agency as Key|Agency1,
[Amount Beg Bal] as [Amount Beg Bal_New]
Resident BegBal;

and in the front end create a chart,

bring dimension - Key|Agency1  and
Expression - sum(Amount Beg Bal_New)

You can rename your expression as you want.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Not sure what you are trying to do, but try like this

BegBal:

LOAD
Agency,
[Amount Beg Bal]
FROM
[..\SourceDocuments\QVD\Layer2\BegBal.qvd]
(
qvd);

BegBal2:
Load  DISTINCT

Agency,
Agency as Key|Agency1,
Resident BegBal;


Hope this helps you.


Regards,

Jagan.

simenkg
Specialist
Specialist

There is no link between your two tables. Key|Agency1 comes form one table and [Amount Beg Ball] comes from the other.

Putting these two fields in a table box will create a Cartesian product between them creating all possible combinations.

JonnyPoole
Employee
Employee

Agreed ... ignore above post as inaccurate. amazing what a good night sleep can do for your ability to read carefully.