cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Application
Use this script in a pivot table where a column may have all NULL values to clean up the UI.
The irrelevant columns are dropped after being loaded
widget.on('ready', function(){
   var tlen = parseInt($('.p-container thead tr td').last().prev().attr('fidx')) + 2 //counts how many cols total
   var dims = $('#pivot_ td.p-dim-head').length // counts the number of dims
   for (var i = dims; i < tlen; i++) {
      var stuff = $('#pivot_ td.p-value[fidx='+i+']:not(.p-total-row-val)').text().trim()
   //if the text content is empty then hide the column
   if(stuff ==''){
         //$('td[fidx="' + i +'"]').css('display', 'none'); //hides column
   $('td[fidx="' + i +'"]').remove(); //hides column
      }
   };
});
Version history
Last update:
‎03-02-2023 09:13 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 community@sisense.com