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 / Calculation don't retu...
Power Apps
Answered

Calculation don't return precise result (3.26x5000=16299.99999...)

(0) ShareShare
ReportReport
Posted on by 134

Hi,
I am working with a table having a column displaying the results of the multiplication of 2 input values.
multiplication.JPG

I want a result without the decimal part, so I tried to use RoundDown here:

 

 

RoundDown(TextInput1.Text*TextInput2.Text, 0)

 

 

rounddown_result.JPG
It worked well until I came across some kind of numbers, and so confused that calculated results with them returned wrong.

Is it supposed that calculation in PowerApps is kind of different from what we had learned? (1.39x10=13.899999...)
Please help! And tell me if you know any about it

Categories:
  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @Kimii 

     

    To remove the decimal point from the result, use the below formula:

    Value(First(Split(Text(TextInput1.Text*TextInput2.Text),".")).Value)

     

    This will return a number. If you to it to return as string then use the below formula:

    First(Split(Text(TextInput1.Text*TextInput2.Text),".")).Value

     

    Please let me know if you face any problem & remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Kimii Profile Picture
    134 on at

    @ManishSolanki Thanks for your reply. It worked for me!
    may I ask why using Text() can make the wrong number (13899.99999...) change to

    the right result (13900) as it must be?

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @Kimii 

     

    The variation of Round formula, works as:

    • Round rounds up if the next digit is decimal part is 5 or higher. Otherwise, this function rounds down.
    • RoundDown always rounds down to the previous lower number, towards zero.
    • RoundUp always rounds up to the next higher number, away from zero.

    In my previous post, I have just removed the decimal part of the number without rounding off so if Result is 13899.99999 then it will just return 13899 and will not perform any mathematical round off operation. If you want to round off the result, you may try abovesaid different variations of Round formula.

     

    Thanks

  • Kimii Profile Picture
    134 on at

    @ManishSolanki 
    oh, I had actually believed that By picking up only the part standing before the decimal mark (.), if result is 13899.9999... then I'll get 13899.
    But then I tried the way in your first post, then it returned 13900 😅 so I just try to ask you about how it can change in that way

  • MarcelLehmann Profile Picture
    378 on at

    i wouldn't recommend you the split solution, cause if there is a ',' instead a '.'
    -> somebody nobody knows, it will not work. i use split as a last solution if nothing work

    normally you are correct and your function should work. (like the image)

    2023-04-24 07_03_59-Power Apps und 3 weitere Seiten - Privat – Microsoft​ Edge.png

     

    Why the text function 'work' is, u just vonvert the value to a string -> split doesn't work with value.

    IF the function like yours doesn't work, you could convert the value like, but as i said before it should normally work -> Text(RoundDown(TextInput1.Text*TextInput2.Text, 0),"0")

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Kimii ,

     

    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.

     

    I think this link will help you a lot:

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

     

    Best Regards,
    Bof

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard