Support » Plugin: Calculated Fields Form » correct way to use power

• Hi,

Can you please tell me the correct way to use power? (i am using for fieldname 6)

(fieldname2-fieldname5*(1+fieldname4)^fieldname3)/(((1+fieldname4)^fieldname3-1)/fieldname4)

The results should be the following:
Fieldname 1:`€ 3.000,00
Fieldname 2: € 900.000,00
Fieldname 3: 15
Fieldname 4: 5%
Fieldname 5: € 10,00
Fieldname 6: € 41.707,10
Fieldname 7: € 3.475,59
Fieldname 8: € 802,06
Fieldname 9: € 114,27

Viewing 4 replies - 1 through 4 (of 4 total)
• Hello @layla1982

The plugin includes the POW operation. POW(X,Y) would be the equivalent to X^Y

So, the equation would be:

`(fieldname2-fieldname5*POW(1+fieldname4,fieldname3))/((POW(1+fieldname4,fieldname3)-1)/fieldname4)`

Best regards.

Many thanks! it works 🙂

Another question, how to round this calculated field up to 2 decimals?

Hello @layla1982

You can use the PREC operation. PREC(X, Y) rounds the number X with Y decimals. So, the equation can be edited as follows:

`PREC((fieldname2-fieldname5*POW(1+fieldname4,fieldname3))/((POW(1+fieldname4,fieldname3)-1)/fieldname4), 2)`

Best regards.

Many thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
• The topic ‘correct way to use power’ is closed to new replies.