Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have 3 diferrent expressions given below. I have a requirement where in one of fields in the table should show the Minimum of the values derived from below expressions if the user clicks "Min" in the list box.
(Sum({<Year={$(=Max(Year))}>} PAmount ))
(Sum({<Year={$(=Max(Year))}>} AAmount ))
(Sum({<Year={$(=Max(Year))}>} BAmount ))
Similarly if the user clicks "Max" in the list box, the max value among the above expressions should be picked up.
Can anybody help me in putting the expression for Min and Max values.
Regards,
Raghav
Hi Raghav,
Create an inline table with values 'Min' and 'Max'.
Assign the value of this field to a variable and use it in the set analysis.
Whenever the user selects the 'Min' or 'Max' it will be assigned to the variable and it will be in turn used by the set analysis
<code>
variable definition:
sortval=GetFieldSelections(sort)&'(Year)'
expression definition:
(Sum({<Year={$(=$(sortval))}>} PAmount ))
(Sum({<Year={$(=$(sortval))}>} AAmount ))
(Sum({<Year={$(=$(sortval))}>} BAmount ))
</code>
Cheers,
Haneesh
Hi Haneesh,
Thanks for your reply. I will try to elaborate my question. I have a list box with the following values
Min , Max and Avg
For Share valuation I need to pick Min or Max or Avg values coming out of below mentioned expressions.
(Sum({<Year={$(=Max(Year))}>} PAmount )))) assume the outcome of this expression is $2000
(Sum({<Year={$(=Max(Year))}>} BAmount )))) assume the outcome of this expression is $3000
(Sum({<Year={$(=Max(Year))}>} AAmount )))) assume the outcome of this expression is $4000
now if I click Min $ 2000 should be picked up for share valuation, similarly if Max is clicked $4000 should be picked up.
Can you please help me how to do it.
Regards,
Raghav
Perhaps this?
if(MyField='Min',rangemin(sum(...PAmount),sum(...BAmount),sum(...AAmount))
if(MyField='Max',rangemax(...)
,rangeavg(...)))
Thanks John.... It works. Perhaps I used "NumMin", NumMax and Num Avg functions.
Regards,
Raghav