dougnewton
01-17-2024ETL
Turning zeroes to blanks/empty cell when Zero
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 = ' '
}
)