Turning zeroes to blanks/empty cell when Zero
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 = ' '
}
)
Published 01-18-2024
DRay
Admin
Joined February 06, 2023