Forum Discussion
Divide by Zero Error Related to Incremental Refresh
I am currently having an issue with incremental refresh. I configure it on the desktop for several tables and refresh the report and it refreshes perfectly. After I publish the report it fails because a "divide by zero error encounted". If I publish the report without incremental refresh it runs perfectly. Has anyone encountered this before?
Hi JEA6489 Issue might be because of the logic please try these
- Review your queries for division operations and ensure denominators are non-zero, using logic like
IF(column <> 0, numerator / column, 0)- Ensure incremental refresh filters don't create empty or invalid partitions.
- Test the queries without incremental refresh and check for any zero or null values in your data.
- Use refresh history in Power BI Service to identify detailed errors.
- Refresh tables individually to locate the problematic table.
6 Replies
- Deku
Super User
I assume that on desktop you have rangestart and rangeend set to a subset of data and in the service the refresh policy is for a greater range of dates. In the greater range of data you have data that causes this error in your calc column/measure.
Akash_Varuna solution should help in this case.
- Akash_Varuna
Super User
Hi JEA6489 Issue might be because of the logic please try these
- Review your queries for division operations and ensure denominators are non-zero, using logic like
IF(column <> 0, numerator / column, 0)- Ensure incremental refresh filters don't create empty or invalid partitions.
- Test the queries without incremental refresh and check for any zero or null values in your data.
- Use refresh history in Power BI Service to identify detailed errors.
- Refresh tables individually to locate the problematic table.
- AnonymousNot applicable
Hi JEA6489,
Thanks for reaching out to the Microsoft fabric community forum.
As mentioned by Akash_Varuna replace division with DIVIDE(numerator, denominator, 0) to handle zeros to bypass the error.
Here are some community posts discussing similar issues. I hope you find valuable insights from them.
Solved: Re: Refresh has stopped working due to 'divide by ... - Microsoft Fabric Community
Solved: Re: Intermittent Microsoft SQL: Divide by zero err... - Microsoft Fabric CommunityIf you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards - AnonymousNot applicable
Hi JEA6489,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- AnonymousNot applicable
Hi JEA6489,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you. - AnonymousNot applicable
Hi JEA6489,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and regards