cancel
Showing results for 
Search instead for 
Did you mean: 

Turning zeroes to blanks/empty cell when Zero

dougnewton
10 - ETL
10 - ETL

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.

 

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

1 REPLY 1

DRay
Community Team Leader
Community Team Leader

Thank you @dougnewton! I have copied this over to a Knowledge Base article. I appreciate the great content!

David Raynor (DRay)