Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Decimal Number vs. Whole Number?

Like (0) ShareShare
ReportReport
Posted on 7 Jul 2020 14:46:51 by

Hi all!

 

I have multiple custom entities I'm building with lots of custom fields that are numbers. My question is: in the long run, is there a benefit to storing as many numbers as I can as whole numbers instead of decimal numbers? Especially if I'm going to have >10,000 records in an entity in the future? Eg: Creating a custom field called "Distance from School" in a custom entity called "Student" and storing a student's distance from school as 1250 meters (whole number) instead of 1.25 kilometers (decimal number)?

 

My thinking is that whole numbers are stored as fixed-point numbers while the decimal numbers are stored as floating-point, and therefore in the long run (when I have tens-of-thousands of records in an entity) it would make sense to have as many fixed-point variables as possible to keep the speed of processing/fetching data/calculations as quick as possible.

 

Thanks!

Categories:
  • Community Power Platform Member Profile Picture
    on 10 Jul 2020 at 13:58:27
    Re: Decimal Number vs. Whole Number?

    @DavidJennaway @EricRegnier 

     

    Thank you both for your answers! The custom fields I am making will go to a known number of decimal points in the metric system, so what I did is just make the units for those fields small enough that the fields were always whole numbers. Eg; I know that I will only go to 2 decimal places in my "Distance from School" field if the units are kilometers, so I made the units meters and stored the numbers as whole numbers.

     

    I understand that the benefits could be negligible, but since I know for a fact the max decimal places I will need (thanks to industry standards) I figured that saving a little bit of processing power with each field will be worth it when I have 10,000 or even 100,000 records of each of my 50 or so different custom fields.

     

    Thanks again!

  • David Jennaway Profile Picture
    716 on 10 Jul 2020 at 11:27:46
    Re: Decimal Number vs. Whole Number?

    I agree with Eric that the performance difference is negligible, and you have better future-proofing with decimal numbers.

    One extra point, decimal numbers are not stored as floating point numbers, but as decimal numbers (which actually take up more space than floating point numbers). There is additionally the option to create fields as a floating point number  

  • Verified answer
    EricRegnier Profile Picture
    8,714 Most Valuable Professional on 09 Jul 2020 at 22:02:04
    Re: Decimal Number vs. Whole Number?

    Hi @Anonymous,

    Unless I know 100% that I don’t need decimal places, I would go for decimal fields instead of whole number for future proofing and flexibility. The performance between whole and decimal numbers are negligible so I wouldn’t base my whole/decimal number decision making on that but rather on the requirements and flexibility of the system because once you create a field you can’t change the data type. Hope this helps...

  • Community Power Platform Member Profile Picture
    on 07 Jul 2020 at 14:55:22
    Re: Decimal Number vs. Whole Number?

    Just a quick follow-up:

     

    Let's say storing as a whole number does benefit overall speed in the long run. If I stored "Distance from School" as a whole number (1250 m) and then wanted to then link the data to Power BI and display it as a decimal (1.25 km,) would doing that calculation end up negating the benefits of storing as a whole number instead of a decimal?

     

    Thanks!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#2
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#3
CU07050602-0 Profile Picture

CU07050602-0 4

Overall leaderboard

Featured topics