6 Replies Latest reply: Oct 14, 2014 3:26 AM by Prince Anand

# Min and max value

Hi ,

How to get the immediate (nearest) min value and immediate (nearest) max value for my selection, if I have some plans like 50,100,200,300,500. If I select the 200 plan, it also should show the min value as 100, max value as 300 for my selection.

• ###### Re: Min and max value

Check this

• ###### Re: Min and max value

Hi anbu1984

Small change(Bold) with your logic to get min value. Works if morethan one is selected

Minimum

=Alt(Max({<ID={"<\$(=Min(ID))"}>}ID), Min(ID))

Maximum

=Alt(Min({<ID={">\$(=Max(ID))"}>}ID), Max(ID))

• ###### Re: Min and max value

hi i want to use this in chart's expression, how i can use this?

• ###### Re: Min and max value

Use

\$(=Alt(Max({<ID={"<\$(=Min(ID))"}>}ID), Min(ID)))

\$(=Alt(Min({<ID={">\$(=Max(ID))"}>}ID), Max(ID)))

If you are going to use it in multiple places, then keep it in variable(Ctrl+Alt+V)

Lets say vMinValueExpr equal to =Alt(Max({<ID={"<\$(=Min(ID))"}>}ID), Min(ID))

and vMaxValueExpr equal to =Alt(Min({<ID={">\$(=Max(ID))"}>}ID), Max(ID))

Use in charts as \$(vMinValueExpr) and \$(vMaxValueExpr )

• ###### Re: Min and max value

Hi

Could you pls explain the inner working of this set exp?

Many Thanks

• ###### Re: Min and max value

Hii,

Please find the attached qvw for required output.

Thanks & Regards

Prince Anand