Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
SQL statement:
declare
@FromDate datetime,
@ToDate datetime,
@startdate AS DATETIME = GETDATE()
set @FromDate = DATEADD(MONTH, DATEDIFF(MONTH, 0, @startdate) , 0)
set @ToDate = DATEADD(SECOND, -1, DATEADD(MONTH, 1, DATEADD(MONTH, DATEDIFF(MONTH, 0, @startdate) , 0) ) )
exec pS_ST32_Machines_All 110, @FromDate,@ToDate
select * from Print_Machines_All where ReportId = 110
No issues with SSMS
but PowerBI return Arithmetic overflow error converting expression to data type int.
Solved! Go to Solution.
Can you open SQL Profilter to check statement that passed to SQL Server when executing your SQL Statement? It may have issue when parsing the SQL statement in Power Query Advanced Editor.
Also I suggest you use query parameter instead of declaring variable in your statement. Please refer to a similar thread below:
https://community.powerbi.com/t5/Integrations-with-Files-and/parameters-to-SP-or-Sql-query/m-p/58337
Regards,
Hallo,
i know this is old, bute maybe someone get along this thread.
in my case i had an issue with the source datatype. I divided a column with 1000 and when the sourc colum was a 'whole number' it worked.
When choosing a different columne the data was a 'whole number'(int) but the datatype was 'decimal' after changeing the datytype it worked.
Can you open SQL Profilter to check statement that passed to SQL Server when executing your SQL Statement? It may have issue when parsing the SQL statement in Power Query Advanced Editor.
Also I suggest you use query parameter instead of declaring variable in your statement. Please refer to a similar thread below:
https://community.powerbi.com/t5/Integrations-with-Files-and/parameters-to-SP-or-Sql-query/m-p/58337
Regards,
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |