Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max(Year) is not working in my expression

Hi All,

I want to pass the Max(Year) dynamically instead of statically(START_YEAR='2010' ). Any idea how to do the same?

I tried to pass $<START_YEAR={$(=Max(START_YEAR))}>} instead of START_YEAR='2010' but it didn't work. Please help me out


=ceil(sum(if( START_YEAR='2010' and wildmatch(Category,'*Call1*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) /
sum(if(START_YEAR='2010' and wildmatch(Category,'*Call1*') > 0 ,1,0)) ,.01)







18 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

You can try out the if statement suggested above. Try if it works.

Not applicable
Author

Hi Deepak ,

We can do that without creating the variable

if(max(Year) = Max(year) , Sum(Amount)).)

Hi Attidue

We understand that you want to pass the maximum year to Start_year=2011. Are you trying to pass the max(year) to the start_year so that the expression should get calculated only for the Maximum year?

Not applicable
Author


XXX wrote:
We understand that you want to pass the maximum year to Start_year=2011. Are you trying to pass the max(year) to the start_year so that the expression should get calculated only for the Maximum year? <div></div>


Yes you are right! The expression should get calculated only for the maximum year.

Not applicable
Author

Hi Attitude ,

You can create variable & then assign something like below :

=YEAR(aggr(max(CREATED_YEAR),SRV_CODE))

Cheers ,

Bhushan N

Not applicable
Author

Hi Bhusan,

Thanks!

Do you mean to say that I have to create a variable like below?

vMaxYear=YEAR(aggr(max(CREATED_YEAR),SRV_CODE))

Not applicable
Author

Yes

Not applicable
Author

Hi Bhusan,

Thanks!

I tried it but it doesn't seems to be working. Do you have any other solution for this?

Not applicable
Author

Hi Attitude ,

I think this will help u out .

Create a variable ,lets say "Var_Max_Year" & assign below expression to it

=

max( {1} START_YEAR)

Then you can use the same whereevr required .

Regards,

Bhushan N





Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I noticed that you are enclosing your Year value in single quotes... Is your Year an alphanumeric field, as opposed to numeric? If it is, then function Max() can't work - you should use MaxString() instead, or even better off, convert your Year to a number.