Forum Discussion
Handling large decimal number
Hi PowerBI Community
I am dealing with large decimal number. and receive this error message.
"
DataSource.Error: An error happened while reading data from the provider: 'Numeric value does not fit in a System.Decimal'
"
is there a way to fix this in power query? I don't want to exclude the data, I need to include them still. preferably not by reducing the decimal from the source
Thank you
It only shows 9 digits in the table but it maintains precision to about 15 significant figures.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-data-types
Fixed Decimals and Whole Numbers can express up to 19 digits of significance but aren't a good fit for the example given. For 20+ significant digits, you'd have to store them as text or break them into multiple columns.
6 Replies
- Greg_DecklerCommunity Champion
ikhwan_tokenomy That's a new one, just how big is this number?
- ikhwan_tokenomyFrequent Visitor
for example the number is
0.0004198058911676167080085202
data source is postgre, field data type is numeric
Greg_Deckler- Greg_DecklerCommunity Champion
ikhwan_tokenomy I don't have Postgres to test with but I imported from a CSV file and it imports OK. However, when converting to decimal number it only has a decimal precision of 9 as shown in Power Query. However, once it loads into the table it has 19. Seems like the only way to preserve it would be to have it be Text.
- AlexisOlsonSuper User
It only shows 9 digits in the table but it maintains precision to about 15 significant figures.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-data-types
Fixed Decimals and Whole Numbers can express up to 19 digits of significance but aren't a good fit for the example given. For 20+ significant digits, you'd have to store them as text or break them into multiple columns.
- vanpraetpFrequent Visitor
Hi ikhwan_tokenomy and Greg_Deckler - I am experiencing exactly the same problem with a Postgres connection data import. Also dealing with a decimal number with a large amount of digits after the 'dot'. Also getting the error message "DataSource.Error: An error happened while reading data from the provider: 'Numeric value does not fit in a System.Decimal". Did you find a way to deal with this?