Skip to main content
Community site session details

Community site session details

Session Id : kowZ1FZrMAReH5yqWjTK3v
Power Apps - Building Power Apps
Answered

Division function not getting decimal numbers

Like (0) ShareShare
ReportReport
Posted on 17 Jan 2023 06:00:15 by 36

I have Number DataCardValue that name Total Amount and 12 DataCardValue refer to months, 

I implement formula that divide Total Amount/12 to each DataCardValue

RoundDown(DataCardValue5.Text/12, 0.00)

but it not getting whole number for example 50/12 must be 4.16 but calculate 4.00

  • v-bofeng-msft Profile Picture
    on 17 Jan 2023 at 07:12:05
    Re: Division function not getting decimal numbers

    Hi @Anonymous221221 ,

     

    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

  • Anonymous221221 Profile Picture
    36 on 17 Jan 2023 at 07:04:54
    Re: Division function not getting decimal numbers

    Hi @v-bofeng-msft 

     

    Thanks It's working but when i sum all values it's not accurate

    For example 50/12 = 4.1666 Now It's working fine but when I sum 4.166 twelve time it give 49.9999 instead of 50. Can you have solution of it

  • Verified answer
    v-bofeng-msft Profile Picture
    on 17 Jan 2023 at 06:03:26
    Re: Division function not getting decimal numbers

    Hi @Anonymous221221 ,

     

    Please try:

     

    RoundDown(DataCardValue5.Text/12,2)

     

     

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete