Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have a list box with some numeric value
i want to have a text object that show the maximum value of the list box
i know this is the very simple but my question is this:
Values |
---|
1 |
4 |
5 |
7 |
9 |
for example if user select number 7 from this list i want to see 5 in the text object
it means that i want to see the maximum of values from the new list with smaller than user selected value (in this example it meant the max from 1,4,5 and its 5)
if user select 5 i want to see 7
what should i do?
Hi Enrique
thanks for your answer
I changed your expression like below and i got my answer correctly:
=max({1-$} if(value<GetFieldSelections(value),value))
Is necesary to have list of number in the same list?
I am not sure I understand your explantation - if the user picks 7 are you saying the highest is 5 because that is the highest number up to what they selected?
if that is true than I do not understant why if they pick 5, the user should be 7
This expression works in a text box:
=Aggr( If(N = Only( {1} N), Above(Only( {1} N)) ) , N )
See file attached
I also turned on the option (checkbox) of "Only One Selected Value" for the properties of the list box... not entirely necessary.
Hi Enrique
thanks for your answer
I changed your expression like below and i got my answer correctly:
=max({1-$} if(value<GetFieldSelections(value),value))
Hi Petter
your answer will be correct if in my data source like excel file i have my values in sort mode
but if have something like below:
Value |
---|
1 |
2 |
5 |
9 |
8 |
i cant get correct answer
i changed the expression that Enrique said and i got correct answer
the correct expression:
=max({1-$} if(value<GetFieldSelections(value),value))