4 Replies Latest reply: Oct 30, 2014 10:55 AM by David Rodriguez

# Max value in alternate state field

Hello!!!

What is the syntax to find the maximum value of a alternate state field?

This is my original expression: Sum({<ID_ROLLING={\$(=Max(ID_ROLLING))},YEAR=[Group PL 1]::YEAR, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

But now I just need those whose [Group PL 1]::year is the maximum value. Something like this wrong expression: Sum({<ID_ROLLING={\$(=Max(ID_ROLLING))},YEAR=[Group PL 1]::max(YEAR), MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

Regards.

• ###### Re: Max value in alternate state field

Hi,

Syntax is

Max({Platform1}(InputDate))

here Platform1 is the alternatestate name.

• ###### Re: Max value in alternate state field

Shruthi, thanks for your answer. But I need to set it as a condition of the function. My function is sum (not max), but a condition of the sum function is that the year value is the maximum.

I'll try to explain better, this is my original function: Sum({<ID_ROLLING={\$(=Max(ID_ROLLING))},YEAR={\$(=Max(YEAR))}, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

I need the same function, but the condition of the maximum year must be for a specific alternate state, in this case : [Group PL 1] is the alternate state name.

• ###### Re: Max value in alternate state field

Hi,

I hope this works.

Sum({<ID_ROLLING={\$(=Max(ID_ROLLING))},YEAR={\$(=Max({[Group PL 1]}YEAR))}, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)