Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Return field with highest value

Thanks in advance for any replies.

I have a load which includes the fields below, indicating how old the record is in days and the value - so only one of these 5 fields can be populated with a value > '£0':

EXAMPLE
[0-30] - £0
[31-60] - £800
[61-90] - £0
[91-120] - £0
[>120] - £0

This means that the record is 31-60 days old with a value of £800
What I need is a function or code to recognise which of the 5 fields has the value > '£0'
rangemax returns the highest value of £800 which is ok but need to recognise which of the 5 fields this value is in.



2 Replies
vincent_ardiet
Specialist
Specialist

Hi,

Try with FirstSortedValue. You can obtain the age with the biggest amount.

Regards,

Vincent

Anonymous
Not applicable
Author

Thanks for the reply.

Tried that but not sure it works as we need to look over 5 different fields rather than 1?

Hope this makes sense