Skip to main content
Question

Sorting duplicates gets rid of cells with values in


joe.fme
Contributor
Forum|alt.badge.img+4

Hi all,

 

Feel like a regular here now, but after the success of my last question about keeping the lowest date in a series of entries, it appears that only some of these entries have values in. For example the reference field and date field will always have a value in, but the others? Not so much.

 

Here's an example (attached).

 

I've tried to use Aggregators and AttributeManagers to varying levels of success, which have ultimately caused more issues...but I wondered if there was a way of keeping the data from the populated rows and putting them into the others for that specific Reference number? Hopefully the attached screenshot will show what I mean. Apologies for the blanking out of data as it's confidential, but I've been wondering about this all day. It seems so simple, yet...not.

 

Thank you

4 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • January 14, 2021

Are you wanting to keep just one record but have all the values populated from other records? Or keep all the records and populated the missing attributes?


joe.fme
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • January 14, 2021
ebygomm wrote:

Are you wanting to keep just one record but have all the values populated from other records? Or keep all the records and populated the missing attributes?

Hi,

 

I hope to get the one row which has the target date (which is the lowest date), but that usually means the other columns are blank except for maybe 1 or 2 of them.

 

Ideally I want to get those populated, so the row is as populated as it can be


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • January 14, 2021
joe.fme wrote:

Hi,

 

I hope to get the one row which has the target date (which is the lowest date), but that usually means the other columns are blank except for maybe 1 or 2 of them.

 

Ideally I want to get those populated, so the row is as populated as it can be

If you use an aggregator and have it set to merge incoming attributes it should keep the value from the first populated occurrence. Use a null attribute mapper to ensure null attributes are populated as missing.


Forum|alt.badge.img+2
  • January 14, 2021

@joe.fme​ - @ebygomm​ is correct. Use NullAttributeMapper to ensure all <null> or <empty> values are set to <missing> then use the Aggregator with Accumulation Mode: Merge Incoming Attributes. Probably Group By your date. You learn something everyday - didn't know Aggregator had this behaviour. I've attached a small example for future reference.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings