Where the Statistic shown on a table or a chart is naturally a percentage, you can use the in the **Properties > APPERANCE** menu to display or hide the percentage sign.

In some situations, such as when computing Net Promoter Score, the results of a calculation may be interpretable as percentages, but this button will not be available, as the statistic in which the outputs are stored, typically the Average, are not percentages.

This post contains the steps to go from a table showing the Average...

to a table with the same statistics renamed (to Net Promoter Score) and with percentages signs added:

## Method

- Select the table.
- Go to
**Properties > Inputs > Statistics****>**select**% Share**.

- Go to
**Properties > Rules > + > New Custom Rule (write your own JavaScript)**. - Select
**Edit JavaScript**. - Input the below code:

//Hijack the % Share statistic to show the Average with %

The above code inserts the Average data into % Share. This code also renames the statistic as Net Promoter Score. You can amend the code to use a different statistic and label.

//CHANGE if you want to show the "real" % Column Share in the table

//change that to a different % statistic you're not using

var pctstat="% Share";

//CHANGE the text in "" below to the name you want for your statistic

var newname="Net Promoter Score";

//create variables for number of rows/columns for loop

var n_rows = table.numberRows; var n_columns = table.numberColumns;

//get the Average values shown in the table var averages = table.get("Average");

//get the current percentage values to overwrite

var percents = table.get(pctstat);

//loop through the cells in each row/column for (var r = 0; r < n_rows; r++) for (var c = 0; c < n_columns; c++)

//overwrite the percent value with the average value percents[r][c] = averages[r][c];

//write the new values to the table table.set(pctstat, percents);

//rename the percent statistic with what you want the new one called form.setTranslation(pctstat,newname); - Select
**OK.** - Go to
**Properties > Inputs > Statistics****>**deselect**Average**(the original statistic).

## See Also

How to Add a Table Statistic to Row Labels

How to Access Statistics from a Table in a Rule