Skip to main content
Question

Finding which attribute has the max value through several attributes (@argmax?)

  • June 9, 2020
  • 5 replies
  • 161 views

Hey there,

Building on the question in this link: https://knowledge.safe.com/questions/70747/finding-the-largest-value-through-multiple-attribu.html

I want to find the attribute that the max value in the function @max(Value(A), Value(B), Value(C) belonged to. See image below for example:

Is there any function in FME that could help me with this? As the title implies, I thought something like @argmax(...) would exist, but I have not found what I am looking for.

Thanks in advance

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

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • June 9, 2020

One possible way using an attribute exploder

Find_max_across_attributes.fmwt


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • June 9, 2020

You could do it with a conditional in an AttributeCreator/Manager.

This does evaluate the max twice, alternative you could create a temp attribute storing the max, and have the conditional check if A = maxVal etc.


takashi
Celebrity
  • 7843 replies
  • June 9, 2020

This workflow could also be possible. The ListElementFilter is a custom transformer from the FME Hub.


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • June 9, 2020

This workflow could also be possible. The ListElementFilter is a custom transformer from the FME Hub.

Interesting use of the AttributeExploder. It would be nice if there was a parameter to exclude hidden fme/reader attributes


takashi
Celebrity
  • 7843 replies
  • June 9, 2020

This workflow could also be possible. The ListElementFilter is a custom transformer from the FME Hub.

I hope "Selected Attributes" parameter will be added to the AttributeExploder, so that the user can select attributes to be exploded or NOT to be exploded optionally.

See also this Idea.

Option to Select Attributes that should not be Exploded in AttributeExploder