web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / decimal calculation bug
Power Apps
Answered

decimal calculation bug

(0) ShareShare
ReportReport
Posted on by 7

I found following bug.

So Please tell me solutions to fix.

---

1-0.8
→0.199999999..... (0.2 is expected)

 

I also found following solution,

But I can not understand the reason It works well.

Please tell me about this.

---

Value(Text(1-0.8))
→0.2

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @kazuki77777 ,

     

    This is not a bug, this is a feature of floating-point arithmetic .  Floating-point arithmetic is approximate, so it can sometimes give unexpected results with many documented examples. You might expect the formula 55 / 100 * 100 to return exactly 55 and (55 / 100 * 100) - 55 to return exactly zero. However, the latter formula returns 7.1054 x 10–15, which is very small but not zero. That tiny difference doesn't normally cause a problem, and the app rounds it away when showing the result. However, small differences can compound in subsequent calculations and appear to give the wrong answer.

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/data-types#number-and-currency

     

    Best Regards,

    Bof

  • kazuki77777 Profile Picture
    7 on at

    @v-bofeng-msft 

    Thank you for your so much helpful response!!

    I understand that text field is one of the best solutions in this case.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard