Skip to main content

Replace Null values or N/A's with zeros in Pivot Grid

Comments

41 comments

  • Barry Gaffey

    I am in the exact same boat as Brian Wilson

    I'm trying to show a 0 across more than one dimension table and I was using that method of adding the hardcoded 0 LeftJoin column.

    0
  • An Y

    I need to loop through all the columns in my Pivot and replace empty row cells with '$0.00' for the columns that don't have the text '% change' in the heading . I found the below script  that can replace the text but struggling to loop through the columns and change value on a conditional basis. Anyone who can help?

    widget.on('ready', function(){

    $('td[class*=p-value] div').map(function(i, cell) {
    if(cell.innerHTML == " " ) cell.innerHTML='$0.00';
    })
    })

    0
  • Hendrik Venter

    My requirement is to simply display a 0 in a Indicator widget when no data.

    " IF(ISNULL(SUM(value)) = true, 0, SUM(value)). " doesn't work

    Got this formula to work in the end:

    IF(ISNULL(SUM(value)), 0, SUM(value)).

    1
  • Michal Saam

    Did someone manage to replace the Null or N\A cells with text\0 in a pivot after left-joining another table?

    0
  • Toby De Lorenzo

    Hi,

    Thanks for the help on this one, however I've noticed that when you have an infinite scroll or pagination it reverts back to N/A. 

    Anyone worked around on this?

    Thanks in advance,

    Toby

    1
  • Chris Bridges

    Does anyone know how to show NULLS as 0 in a line chart? It seems like it should be similar code but I haven't been able to get anything to work.

    Thanks,

    Chris

    0
  • Nathan Giusti

    Chris Bridges

    It's not similar at all. 

    0
  • Chris Bridges

    Okay, thanks Nathan Giusti.

    I turned on the (new to me) feature continuous timeline to get it to work.

    0
  • Nathan Giusti

    Chris Bridges

    Yeah, that functionality has been set up for some widgets but not others so you lucked out. The added feature is very new. Pivot users will still have problems. 

    0
  • Paul Furman

    I'm using a simple table widget in 8.2.1.10097 and none of the mentioned methods work.

    I need to replace the "N\A" (which is NULL in data source) with an empty cell and highlight that cell with red (or whatever color).

    Is that possible?  Seems to be missing a very basic functionality...

    0
  • JJ Chritton

    Has anyone gotten this to work with the new pivot 2 widget APIs? I've tried a lot of variations on this, without any luck replacing those "N\A" that show up in the row level data.

     

    ****UPDATE****

    I worked with someone from support and was able to update the script earlier. This is working for us. One of the keys to this was that you can only specify one "type" at a time.

    widget.transformPivot(
        {
            type: ['member']
        },
        function (metadata, cell) {
                                   
        if(cell.value === 'N\\A') {
                                    cell.content = ' ';
                    }
        }
    );

    0

Please sign in to leave a comment.