web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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,678 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,678 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard