Question

How to assign a count of duplicate attribute values to a new attribute

  • 17 June 2016
  • 1 reply
  • 47 views

Badge +7

I am trying to use a transformer that will look at a single attribute and return with a count value equal to the number of instances that the defined attribute has identical values being used within it. I tried the numeric count attribute created by a statistics counter, but that was not correct. Can anyone tell me what transformer can do this if any?


1 reply

Userlevel 4

The StatisticsCalculator is a good choice. Set a group by on the attribute with identical values, then look at the Count attribute output in the Summary.

You will then get one feature per unique group by-value, including a count of how many times it occurred.

Reply