Jump to content

Get second Maximum using expression...


pratikpathak
Go to solution Solved by Gaia Paolini,

Recommended Posts

Hi, I'm trying to find second maximum using custom expression, i know max([timeperiod]) gives maximum value from timeperiod, my question is how can i get Second maximum value using expression?

best regards,

Pratik Pathak

 

Link to comment
Share on other sites

  • Solution

You could define a column that ranks your [timeperiod] in descending order:
 

DenseRank([timeperiod],'desc')

then use it to find the maximum value of the expression DenseRank([timeperiod],'desc')=2 (which would be max when this statement is true), like this:

 

ValueFormax(DenseRank([timeperiod],'desc')=2,[timeperiod])

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...