Hi, I am having trouble with an expression in my PowerAutomate Workflow. I was tasked with optimizing a previously manual reporting process, and some of the metrics in the report were not able to be automated completely. As a result, I am using a microsoft form, flow, and sharepoint list to capture some of my data points. However, I am running into an issue in my PowerAutomate Flow that calculates a composite score based on values input into the MS Form. Specifically, my issue is with an expression not behaving as expected. It is a nested If statement, see below:
mul(
if(
less(float(outputs('get_response_details')?['body/r5953f27b9a604aa9950b24a4b5a04735']), 0.9650),
0,
if(
less(float(outputs('get_response_details')?['body/r5953f27b9a604aa9950b24a4b5a04735']), 1.0),
div(
sub(float(outputs('get_response_details')?['body/r5953f27b9a604aa9950b24a4b5a04735']), 0.9650),
sub(0.9750, 0.9650)
),
if(
less(float(outputs('get_response_details')?['body/r5953f27b9a604aa9950b24a4b5a04735']), 0.9850),
add(1,
div(
sub(float(outputs('get_response_details')?['body/r5953f27b9a604aa9950b24a4b5a04735']), 0.9750),
sub(0.9850, 0.9750)
)),
2
)
)
),
0.25
)
In the instance causing the error the output from the MS Form was 0.99, which I am expecting to return a .5. However, when the flow runs it is returning .625. Does someone see something that I don't that is causing this unexpected behavior?