SAP Knowledge Base Article - Public

3462894 - Story displays error "Internal Error Occurred" - Divide by Zero

Symptom

  • Story displays an error "Internal Error Occurred", upon building a calculated column where Division is being performed and divisor value is Zero. 
  • Detailed error, in Browser > Network log, displays "DetailedError": "Caught exception : exception 42111: SQL Error : div by zero occurred error returned from /\n"

 

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SuccessFactors HCM Suite
    • Analytics & Reporting (Ad Hoc, YouCalc, ORD, Story)
      • People Analytics (Analytics Cloud for SF)
        • Query Designer - Filter, Calculated Column, Params

Reproducing the Issue

  1. Login to SF Instance and navigate to Report Center
  2. Create a simple story query with below calculated column condition ([value1]/[value2])
  3. When previewing the query, an error message "Internal error occurred while processing", is displayed 
  4. Notice the error in the Browser's network log (This KBA will help you with fetching this information 2280022):
    "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" 

Cause

The value of divisor [value2] would be '0' (zero).

Resolution

We need to avoid the columns/fields which could have a value of 0 in divisor. Or else it will lead to 'Divide by Zero' error. 

 

Alternatively, if there exists some values with 0 in the field/column used in the divisor, then you may use the formula within an IF function.

Eg: IF([value2]>0, (([value1]/[value2])) , 0)

See Also

3522465 - Story displays an error "Internal Error Occurred" - Attribute value is not a number

Keywords

Divide, calculated column, correlation, zero, condition, Divide by zero, Division by zero, Error, Story, People Analytics , KBA , LOD-SF-ANA-SAC-SDS , Story Designer - Story & Formatting , Problem

Product

SAP SuccessFactors HCM Core 2405