Question

Find ID where attribute value differs

  • 15 September 2016
  • 4 replies
  • 10 views

I have a table containing an ID and number attribute. ID's are not unique. I need to identify all the ID's that have different number attribute values.

180160210021003603100

This example will return ID=1 and ID=3


4 replies

Badge +16

Hi @etienne, there are probably many ways to solve this, this is my take on it.

Hope this helps

Userlevel 5
Badge +25

I've done it with a ListBuilder, grouping by ID. Then a ListDuplicateRemover, so if there's duplicate values for an ID (ID=2 in this case) they get condensed to a single element, then a ListElementCounter. Any list with 1 element is an ID where the attribute values are all the same, so a TestFilter to check where the element count is more than 1 yields the ID's where there's different attribute values.

id-not-unique.fmwt

Userlevel 5
Badge +25

Hi @etienne, there are probably many ways to solve this, this is my take on it.

Hope this helps

Almost the same solution but you beat me by 13 seconds :)

 

 

Badge +16
Almost the same solution but you beat me by 13 seconds :)

 

 

:) wow funny

 

 

Reply