In the counter, you can set the "Counter Name" to a attribute value, but can not set up multiple attribute values, if can be allowed to do so, will be more convenient to generate the "Group ID" such values.
Hi @taojunabc, you can set multiple attribute values to the Counter Name parameter as a concatenated string using the Text Editor. Doesn't it satisfy your requirement?
'
Oh, I don't know this feature. It's perfect.
Thank You !
We should make this easy to find -- Group By would be the logical way to accomplish this. We have a plan to make a change, but in the meantime (and forever) the plan @takashi suggests will work.
Thanks for your comment.I'm looking forward to Group By.
I think that only through "Counter Name" parameter to realize the functions of identification and Group By,it can
cause some confusion to the user.I think that in addition to the "Counter Name" parameters, add a "Group By" parameter may be better,Such Counter Name can be used as the identification of different Counter, and
Group By can be used to determine whether you need to Group according to the
attribute(s).
I have another idea, if can add a drop-down list to "Counter Name",When click it automatic
display other Counter's "Counter Name" list. can be more
convenient to relate the Counter to other Counter.
OMG @takashi this saved my day! I needed to count by group and was amazed it couldn't be done. Well, now I know it can but it's not discoverable. @daleatsafe adding "Group By" would be more intuitive and follows the same patterns we're used to in FME.
omg I wondered why there wasn't a group by - I never noticed the attribute option on the side! Only been using FME for 10 years!
Saying that - a Group By input box with the Text Editor option and the Counter Name separate that would be more consistent with other transformers.
Thank you @Takashi. This suggestion works perect. I also struggled with Count by Group and this solves my problem.
Thanks @Takashi. I was looking into this issue and your approach worked perfectly!
Thanks @Takashi. I traditionally used 'cumulative' pipe from StatisticCalculator transformer as workaround for being unable to groupby using Counter transformer. Using counter name to group like features is much straightforward approach!
Hello, I still can't use the group by with the transform Counter. I read the different answers but I still can't do it... Do you have any examples of use? Thanks a lot !
Give us more details about your data.
@dozhwal The screenshot above is from a much older version of FME. In newer versions, change the Count Scope to Local, then Group Processing should be enabled. From there, set the Group By parameter to the desired attribute you would like to group by. The below screenshot is from 2021.2.