# calculated value with multiple checks

Question asked by michaels750 on Jun 5, 2016
Latest reply on Jun 5, 2016 by michaels750

I'm trying to set a calculated value based off two number fields which can be between 1-5.

Now depending on this combination the fields the result will differ. e.g. 1&1=1, 1&2=2, 2&1=3, etc.

I've tried a number of ways to make this function but have failed:

or(

If(and(CurrentFinancialL == 1, CurrentFinancialC == 1), 1),

or(

If(and(CurrentFinancialL == 2, CurrentFinancialC == 1), 2),

or(

If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3),

or (

If(and(CurrentFinancialL == 3, CurrentFinancialC == 1), 4),

If(and(CurrentFinancialL == 2, CurrentFinancialC == 2), 5)

)

)

)

)

or(

If(and(CurrentFinancialL == 1, CurrentFinancialC== 1),1) ,

If(and(CurrentFinancialL== 2,CurrentFinancialC== 1), 2) ,

If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3)

)

max(

If(and(CurrentFinancialL == 1, CurrentFinancialC == 1), 1, 0),

If(and(CurrentFinancialL == 2, CurrentFinancialC == 1), 2, 0),

If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3, 0)

)