Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Duplicate sum values in a one-to-many join

Hello

I have two files, the first with unique claim number (one record per claim) and cost, and the second with non-unique claim numbers (possibly many records per claim) and a code. When I load them in to QV and sum the cost by claim number, the values are multiplied up by the number of duplicates on the second file. For example:


status:
load * inline [
claim, cost
A, 100
B, 150
C, 120
D, 90
];

status2:
LEFT JOIN load* inline [
claim, rule
A, 1
B, 1
B, 2
C, 1
D, 2
D, 3];


I this example if you create a table to sum cost by claim, claim B will show 300 and D 180.

How do I resolve this?

Many thanks!

2 Replies
Not applicable
Author

That's at least the third time I see this post ???
And I'm pretty sure to have seen solution
Is you problem solved ? If yes please do not open severals posts for the same things .

regards

Not applicable
Author

It wasn't deliberate. The website kept crashing every time I tried to submit the post yesterday. Then my post appeared 4 times. I couldn't see how to delete them. The problem has been solved.

What should I do?

Thanks.