Skip to main content
Question

Finding the largest value through multiple attributes


Forum|alt.badge.img

Hi there,

I'm stuck with something which is seemingly simple yet I cannot for the life of me figure out how to get there.

My data looks like this:

COLORABCRED1007658GREEN254678BLUE335912YELLOW895322

I need to find the largest value across A, B, and C. In other words, the output (MAX field) needs to be like this:

COLORABCMAXRED1007658100GREEN25467878BLUE33591259YELLOW89532289

I tried the AttributeCreator @max(@Value(A),@Value(B),@Value(C)) function as explained in this thread: https://knowledge.safe.com/questions/50116/max-value-of-two-attribute-of-a-feature.html

But my output "MAX" field still contains plenty of numbers which are certainly not the biggest of the lot, so I'm clearly doing something wrong.

I also tried the StatisticsCalculator, but when I select multiple attributes to analyse, it generates a "max" field for each attribute independently (ie. A_max, B_max, etc.) instead of giving me a general "max" as I desire.

 

Thanks in advance for any insight,

2 replies

Forum|alt.badge.img

I actually just discovered the answer myself, but I'll post here in case anyone else has the same issue :)

I simply used the Renamed A, B, and C, to MatchA, MatchB, and MatchC. I then used a Listpopulator that identifies attributes with the Prefix "Match", this listing all three my attributes. The I simply used a ListRangeExtractor, and the "Max" attribute there seems to work like a charm!

Cheers,


takashi
Influencer
  • May 21, 2018

Hi @robbie_botha,  the @max function should work as expected. Check carefully again.

@max(@Value(A),@Value(B),@Value(C))

If the expression was correct, but it would still return wrong result, please contact Safe support to investigate what's happening in your case.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings