Could this be simplified to:

    if (total > 0) {
        $scope.table.reduceColumns(0);
     };