Skip to main content
Solved

Aggregate attributes from other attributes

  • April 12, 2019
  • 5 replies
  • 106 views

geo-x
Supporter
Forum|alt.badge.img+6

Dear FME community.

I try to aggregates lines to columns with same ID like that :

In fact it's an intermediate result what I want, because in final result, I need to have this same aggregation with comparaison of different values (best value is A than B) :

This is a link with a data test :

Tank you for your help.

Best answer by ebygomm

If you only want to keep the 'best' value you can assign a score to the value, sort by this score then use the duplicate filter or a sampler to keep only the ID with the 'best' score

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

lars_de_vries
Forum|alt.badge.img+10

You could use the GroupBy function on the ID field and a Concatenate on the Value. The other option could be to use two Aggregators placed in serie. The first can group on both ID and Value and the second could just use ID.

Maybe you can use a TestFilter to define the best value, but I cannot Judge the comparison of the values.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • April 12, 2019

If you only want to keep the 'best' value you can assign a score to the value, sort by this score then use the duplicate filter or a sampler to keep only the ID with the 'best' score


takashi
Celebrity
  • 7843 replies
  • April 12, 2019

What is the definition of the "best value"? In other words, why is "A" is the best in "A", "B" and "Unknow"?


geo-x
Supporter
Forum|alt.badge.img+6
  • Author
  • Supporter
  • 89 replies
  • April 18, 2019

What is the definition of the "best value"? In other words, why is "A" is the best in "A", "B" and "Unknow"?

Dear @takashi in this case it is : B best than A, C best than B etc... it's a particular case


geo-x
Supporter
Forum|alt.badge.img+6
  • Author
  • Supporter
  • 89 replies
  • April 24, 2019

If you only want to keep the 'best' value you can assign a score to the value, sort by this score then use the duplicate filter or a sampler to keep only the ID with the 'best' score

Great answer @egomm, thank you very much !