SAP Knowledge Base Article - Public

3114209 - Some records with blank or null values are displaying as Zero (0) in Story charts and tables widgets

Symptom

Some records with blank values in Query Preview are showing randomly as either Null or Zero in Story widgets

Environment

SAP SuccessFactors HCM Suite

Reproducing the Issue

  1. Create a new Story.
  2. Add the affected field to the query.
  3. After saving query, add the field in a Story widget.
  4. Notice that some fields that appear blank in the Query Preview are displayed as either Null or Zero (0) in the Story.

Cause

A null value means the field has no data at all, whereas a blank indicates that the field exists but contains an empty value. Because the field technically exists, the "empty" can be interpret as zero. 

Resolution

To test if the field value is a true Null value or not, create a simple Calculated Column: 

e.g. IF(ISNULL([Schema#Table#Field]), "Null", "NOTNull" )

  • If the result is Null, this means the record indeed has a true null value in the database, so in Story Charts/Table widgets the value will be displayed as (Null).
  • If the result is NOTNull, this means that although the display in Query Preview is blank, there is actually a value in the database (could be a space character), so the record is not null. Hence in Story view this could be translated as zero '0' to give it a label for display purposes.

Keywords

null, zero, value, story data, query designer, blank, notnull, is null , KBA , LOD-SF-ANA-SAC-QDS , Query Designer - Filter, Calculated Column, Params , How To

Product

SAP SuccessFactors Platform all versions