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: 
racer25
Contributor III
Contributor III

Duplicate Numbers but not rows

Hi All,

Kind of an unusual one ( or I hope not ). Our internal expense system is only able to output a flat file for a full extract of all claims but that creates duplicate numeric values as effectively its a one to many relationship in the extract.

                      

Report IDEMPLOYEE_IDStatusCreatedDateSubmit DtUpdatedSetIDLineLine StatusTypeTrans DateAmountCurrencyTran AmtCurrencyUser RateMultiplierDivisorRate TypeLocationMerchantLong DescrNo RcptName
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 1
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 2
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 3
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 4
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 5

Report ID

EMPLOYEE_IDStatusCreatedDateSubmit DtUpdatedSetIDLineLine StatusTypeTrans DateAmountCurrencyTran AmtCurrencyUser RateMultiplierDivisorRate TypeLocationMerchantLong DescrNo RcptName
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/201384EUR84EURS11DAYDUBLNFood PlaceClientNPerson 1
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/20130EUR0EURS11DAYDUBLNFood PlaceClientNPerson 2
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/20130EUR0EURS11DAYDUBLNFood PlaceClientNPerson 3
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/20130EUR0EURS11DAYDUBLNFood PlaceClientNPerson 4
1566258123456PD29/01/201408/07/201519/12/201415/07/2015COMPANY2PDCLNTENT21/11/20130EUR0EURS11DAYDUBLNFood PlaceClientNPerson 5

Above is initial file 5 (rows) and below that is the same recordset and how I would like it to appear.

Report ID "1566258" is unique

Line "2" is unique to the duplicated line items for that claim only.

The last column contains the differing data which needs be retained.


I am not averse to doing a count of a concatenated Report ID and Line and dividing Trans Amount by Count ? That would also be acceptable to have 16.8 on 5 rows  but the preferable outcome is one row with 84.


I'd appreciate some guidance on how to complete.


Obviously in a perfect world I'd have decent data to start with but I can't fix that so on to plan B.


Thanks in advance,



Rob

3 Replies
neelamsaroha157
Specialist II
Specialist II

Check this

racer25
Contributor III
Contributor III
Author

Hi Neelam,

Thanks for taking a look at.

From your file I can't see an output like the second table I have show with zero for the subseuent records - have I missed something?

Thanks,

Rob

neelamsaroha157
Specialist II
Specialist II

The output is not exactly like the second table but instead of replacing all '84' value, I simply created another table with the data you needed in the second table. Is there any specific reason you want to replace the value with '0'?