cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Formula not giving correct result

Can anyone explain why am I getting an incorrect result in some of the rows (Progress_Status_V_Baseline) like the one highlighted
(row 59)?
Any suggestion of how to fix it, as I am then getting wrong % when analysing the data.

Thanks guys

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous

Please try this code. Check the result in the last row. The left column "Custom" is using your original formula.

``= Table.AddColumn(#"Added Custom", "Custom.1", each if [Value] = -1 then "-" else if [Value] < Number.RoundDown([Improvement]+[Baseline_ToFill],1) then "Below" else "Meet or Above")``

When you do addition or subtraction in Power Query, the decimal number accurance seems change (something like both 0.999999999999999 and 1.000000000001 nearly equals to 1). However I don't find documents which can supports my guess. Based on my test, if I round the result to a specific decimal length, the comparison result will be correct. You may have a try!

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

3 REPLIES 3
Community Support

Hi @Anonymous

Please try this code. Check the result in the last row. The left column "Custom" is using your original formula.

``= Table.AddColumn(#"Added Custom", "Custom.1", each if [Value] = -1 then "-" else if [Value] < Number.RoundDown([Improvement]+[Baseline_ToFill],1) then "Below" else "Meet or Above")``

When you do addition or subtraction in Power Query, the decimal number accurance seems change (something like both 0.999999999999999 and 1.000000000001 nearly equals to 1). However I don't find documents which can supports my guess. Based on my test, if I round the result to a specific decimal length, the comparison result will be correct. You may have a try!

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Super User

Hi @Anonymous

Did you check those numbers with more decimal numbers?

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

The data is extrated from an external source and the input is in decimals...

Announcements