1 Reply Latest reply on Feb 28, 2014 6:19 AM by philmodjunk

# calculation solution...

### Title

calculation solution...

### Post

I'm stuck in the following calculation. For this solution I use a variable field that is used as an input field that is the field “HA”

HA (number field)

--

Part 1 = 1 HA

StartTime (time field)

StartPrice (number field)

CalStartPrice (StartTime  * StartPrice  / 3600)

--

Part 2 = 2 till 5 HA

Time2_5 (time field)

Price2_5 (number field)

Cal2_5Price (Time2_5  * Price2_5  / 3600)

--

Part 3 = 6 and more

Time6_ (time field)

Price6_ (number field)

Cal6_Price (Time6_  * Price6_  / 3600)

--

TOTALE_CAL

What should I do to perform the following calculation

If HA = 1 TOTALE_CAL == CalStartPrice

If HA = 2 TOTALE_CAL == CalStartPrice + 1* Cal2_5Price

If HA = 5 TOTALE_CAL == CalStartPrice + 4* Cal2_5Price

If HA = 6 TOTALE_CAL == CalStartPrice + 4* Cal2_5Price + 1* Cal6_Price

If HA = 27 TOTALE_CAL == CalStartPrice + 4* Cal2_5Price + 22* Cal6_Price

• ###### 1. Re: calculation solution...

There are If and Case Functions that can use the Value of HA to control what if any value is computed.

I'm not sure that I have parsed all the details correctly but it looks like you need:

Case ( HA = 1 ; CalStartPrice ;
HA = 2 ; CalStartPrice + 1* Cal2_5Price ;

and so forth... It's not clear what results you want  HA is 3, for example, so you may need some inequalities here...