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 = ' '
  }
)

Version history
Last update:
‎01-18-2024 10:48 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: