<!-- This is intended to be used inside a SharePoint 2013 "Script Editor" web part or via a Content Editor Web Part in 
	 SharePoint 2010 and 2007.
     See the instructions at http://blog.pentalogic.net/2014/03/add-highlighting-conditional-formatting-pivotpoint-tables
     and the test file highlight-by-column-and-row.html that you can use to experiment with. -->

	 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
	 
	 <script>        

		// This is the JavaScript that highlights the table
	
        $(function () {

			// Select all table cells that are not total cells
            $("TABLE.PivotArrayTable TR TD:not(.Total)").each(function () {				
				
				// Get the contents of the table cell
				var value = "$" + $(this).text();
				
				// If the cells contain numbers with currency symbols you will have to strip them out
				// to be able to do less than or greater than (< >) operations.
				value = value.replace(/[^\d.-]/g, '');
				
				if (value < 165) // If the value is less than 165
					{
					// Set the text color to red
					// See this reference for colour names (e.g. red) and hex values (e.g. #FF0000) 
					// you can use - http://www.w3schools.com/cssref/css_colornames.asp
					$(this).css('color','red');
					}
				else if (value >= 180) // else if the cell value is greater than or equal to 180
					{
					// Set the background to yellow
					$(this).css('background','yellow');
					}
				});            
        });
		
    </script>
	