cancel
Showing results for 
Search instead for 
Did you mean: 
DRay
Community Team Member
Community Team Member

Symptoms

Sometimes with a pivot table full of many columns with zero and only a few non-zero values, you want the zeroes to display as empty-string.  That way the nonzero values really stand out.

(This is the opposite of this:  Solved: nulls to 0 in pivot - Sisense Community )

Below is a widget-level script suggested by tech support which worked for me.

Solution

 

widget.transformPivot(
  {
    type: ['value']
  },
  function setCellBackground(metadata, cell) {
    if(cell.content.trim() == 0)
cell.content = ' '
  }
)

Rate this article: