A short post on the fix for the Division by Zero error due to expressions in HANA calculation views
In SQL, a division by zero error occurs when an expression attempts to divide a number by zero, leading to execution failures. In HANA, this can disrupt calculations within your views, especially when working with dynamic datasets where divisor values may be unpredictable.
The Calculated column is a feature in the calculation view that helps modelers insert information based on the other columns from the data sources.
Recently, I had to troubleshoot an issue with HANA View which was throwing an error on access - division by zero undefined: SQL Error.
The perennial challenge to supporting AMS team consultants is the argument from the stakeholders - "It worked before - Why is it not working now". I struggle to argue coz the opinion is not based on facts but an emotional experience with the system or software. Instead, I try to find the data points and probably share the path to resolution.
In my case, the issue with the canulated column. On inspection, the issue was due to a calculated column with the expression: Value/Total Value * 100. Earlier datasets never had a total value of zero.
No comments:
Post a Comment