Turning zeroes to blanks/empty cell when Zero
Summary: DRay shared a solution for displaying zeros as empty strings in pivot tables to make non-zero values more prominent. They provided a widget-level script, suggested by tech support, which successfully transforms the pivot table by modifying cell content.
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.
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 = ' '
}
)
0 comments