Skip to main content
Question

How to count the number of features with the same value for an attribute

  • May 2, 2014
  • 5 replies
  • 2805 views

Hello,

 

 

I'm passing a load of lines through an FME workbench and eachline has a project name as an an attribute. I want to add an attribute that counts how many lines are in the project (share the project name). Does anyone know how to do this?

 

 

I've tried playing around with the counter but have had no luck. what I need is it to separate out into all the different projects, use the counter, then chuck everything back together. I would use a filter but there are hundreds of projects.

 

 

Any ideas?

 

 

Thanks
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

takashi
Celebrity
  • 7843 replies
  • May 2, 2014
Hi,

 

 

I think the StatisticsCalculator can be used (Group By: project name).

 

 

Takashi

david_r
Celebrity
  • 8392 replies
  • May 2, 2014
Hi,

 

 

you can set the "Counter name" to the name of your attribute. It will behave like a Group By and keep track of one sequence per unique attribute value..

 

 

David

takashi
Celebrity
  • 7843 replies
  • May 3, 2014
The Counter can create "Count1", the StatisticsCalculator can create "Count2".

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • May 6, 2014
Statisticcalulator can create count1 as well when you use cumulative output.

jan
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 50 replies
  • August 12, 2020

This results in a Memory Error for me when having about 2.5 M feataures!