Introduction
The following enables to change the value in pivot tables to specific strings, while allowing the use of conditional coloring as normal.
Step 1 - Add The Following Script To Your Pivot's Edit Script
widget.on('ready', function(){
$('td[class*=p-value] div').map(function(i, cell) {
switch (cell.innerHTML ) {
case "10":
cell.innerHTML='BAD';
break;
case "20":
cell.innerHTML='OK';
break;
case "30":
cell.innerHTML='MEH';
break;
default:
cell.innerHTML='GOOD';
}
})
})
Step 2 - Modify the values in the script according to your need
You can change the 'case' values to match the original values and the "cell.innerHTML" values to the strings you wish to present.
Note: The value after default will determine what will happen with all values not matching the cases above. If you wish to leave the original values in this case simply enter "cell.innerHTML" instead of "GOOD".
Example:
Before script:
After script: