5 Replies Latest reply: Dec 29, 2016 11:50 AM by Riccardo Zanardi

# How to calculate the minimum value greater than another value?

I need to calculate the minimum value greater than a specific calculated value. How to do?

• ###### Re: How to calculate the minimum value greater than another value?

Would you be able to share few rows of data and expected output from the data provided?

• ###### Re: How to calculate the minimum value greater than another value?

I used this expression

min({<ora={">=\$(=(min(Ora_Inizio)))"}>} ora)

trying to get all the min(ora) values greater than Ora_Inizio but... since I have a Ora_Inizio different than the other rows the displayed results get me all the ora greather than the overall minimum of my current selection.

If I select only the day where the "Ora_Inizio" is 7:00, I get what I want  07:00:03

I would like to have this result also when I select all data

Thnk you

• ###### Re: How to calculate the minimum value greater than another value?

May be this:

Min(Aggr(If(ora >= Min({<data>} Ora_Inizio), ora), data, Ora_Inizio, ora))

• ###### Re: How to calculate the minimum value greater than another value?

Great! Thanks for help

• ###### Re: How to calculate the minimum value greater than another value?

May be using set analysis, like:

Min({<Value={'>\$(vCalculatedValue)'}>}Value)

Now, the variable expansion \$(vCalculatedValue) can be replaced by a value or expression you want.