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 / Arithmetic overflow er...
Power Apps
Answered

Arithmetic overflow error importing data from SQL

(0) ShareShare
ReportReport
Posted on by 6

Hello! 

 

I am receiving an 'Arithmetic overflow error converting expression to data type varchar.' error while importing a view from SQL server. Able to import, but when I go to effect the data in power query at all it throws this error. I am only attempting to sort the data not casting any of the values. 

 

Full error:

 

Message=Arithmetic overflow error converting expression to data type varchar.
ErrorCode=-2146232060
Number=8115
Class=16

 

All of the columns seem to match up - all of my varchar columns in SQL are being converted to text values in Power BI. 

 

Any help is greatly appreciated! Let me know if you need more information!

 

I have the same question (0)
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @WorksightedTS To avoid this problem, make sure that the length of the VARCHAR variable or column is long enough to hold the decimal or numeric value, counting the decimal point as part of the converted VARCHAR value.

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • WorksightedTS Profile Picture
    6 on at

    Hi Ahmed, @AhmedSalih 

     

    Thank you for the input. Do you know of a good way to check the SQL database for values that are too long for the varchar length? I have about 30 or so varchar columns and I'm not sure which one needs the length increased. No errors inside SQL server or Power query indicating which column is the issue. 


    Thank you!

  • WorksightedTS Profile Picture
    6 on at

    @AhmedSalih 

  • Verified answer
    AhmedSalih Profile Picture
    6,680 Moderator on at

    @WorksightedTS , 

    SELECT MAX(LEN(column_name)) FROM table_name;

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard