Symptom
When we use divide operation in calculated column at query level, in report story, and preview the query, we might get below error "An internal error occurred while processing".
From Network Log:
"Type": 2,
"Number": 42014,
"Text": "Internal error occurred while processing.",
"DetailedError": "Caught exception : exception 42111: SQL Error : div by zero occurred error returned from /\n"
Environment
- SuccessFactors HXM Suite
- Analytics & Reporting (Ad Hoc, YouCalc, ORD, Story)
- People Analytics (Analytics Cloud for SF)
- Query Designer - Filter, Calculated Column, Params
- People Analytics (Analytics Cloud for SF)
- Analytics & Reporting (Ad Hoc, YouCalc, ORD, Story)
Reproducing the Issue
- Login to SF Instance and go to Report Center
- Create a simple story query with below calculated column condition ([value1]/[value2])
- Preview the query and error will show: "DetailedError": "Caught exception : exception 42111: SQL Error : div by zero occurred error returned from /\n"
Cause
The divisor [value2], can not have a value '0' (zero).
Resolution
We need to avoid the 0 in divisor will lead to 'Divide by Zero' error.
Hence, use condition like below to avoid:
IF([value2]>0, (([value1]/[value2])) , 0)
Keywords
Divide, calculated column, correlation, zero, condition, , KBA , LOD-SF-ANA-SAC-SDS , Story Designer - Story & Formatting , Problem