Select to view content in your preferred language

Need to run formula that uses ^ (caret) for Exponential (power of)

1430
6
07-30-2018 05:49 AM
MichaelStroud
Emerging Contributor

I am trying to convert a formula that I use in excel to Survey 123 Connect. Has anybody found a way to ^ (caret) for Exponential (power of)?

0 Kudos
6 Replies
MichaelKelly
Frequent Contributor

Hi Michael,

You can use the pow() function to do such calculations.

For example if question_one was equal to 2, pow(${question_one}, 3) would return 2 to the power of 3, or 2 * 2 * 2 = 8.

Kind regards,

Mikie

MichaelStroud
Emerging Contributor

Still hitting a wall, can I send you file see if you can help with the formula?

0 Kudos
MichaelKelly
Frequent Contributor

Hi Michael,

See attached Excel file for a sample of how this function can be used.

typenamelabelreadonlycalculation
decimalDecimalNumberNumber
integerToThePowerOfTo The Power Of
decimalCalcResultResultyespow(${DecimalNumber}, ${ToThePowerOf})

The results doesn't necessarily have to be read only.

Mikie

0 Kudos
MichaelStroud
Emerging Contributor
(Observed*(((Static-20)^0.54)/((Static-Residual)^0.54)))

That is the expression in excel spelled out. The observed(1061) comes from a previous formula and the static(90) along with residual(60) are hydrant readings final should be 1677.

(${Observed}*(pow(${Static}-20), 0.54)div(pow(${Static}-${Residual}), 0.54))

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Michael,

It looks like you may have some parenthesis misplaced.  Because pow() is a function, you can probably eliminate a few of the parenthesis from the Excel equivalent as it will self-enforce order of operations by executing an expression in a parameter first.  Additionally, you don't need to group the numerator terms - multiplication won't be affected by order (and since execution order is left to right, the multiplication will technically happen before the division anyways).  This should be the equivalent in XLSform:

${Observed} * pow(${Static}-20, 0.54) div pow(${Static} - ${Residual}, 0.54)

0 Kudos
MichaelStroud
Emerging Contributor

That was it, I was over complicating the formula

0 Kudos