Introduction
In a widget, dashboard, report page, or when streaming a dashboard or report to TV, the error message Calculation Error - An attempt was made to divide by zero in the SQL code appears.
Required permissions
Normal users may encounter this error, but only admins can edit the widget to solve the error.
Possible Causes
- The calculation formula of a calculation layer in the widget is division, but the divisor is 0.
- The calculation formula of the SQL code in the dataset used by the widget is division, but the divisor is 0.
Solutions
- If your widget has a calculation layer, edit the calculation formula of a calculation layer in the widget, see Adding a Calculate Layer to a Widget.
- If the dataset used by your widget contains SQL code, edit the calculation formula of the SQL code in the dataset used by the widget.
If your issue persists, submit a request to our Help Center.