# Comparing values in Power Table

**URL:** <https://forum.inductiveautomation.com/t/comparing-values-in-power-table/85130>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [February 1, 2024, 11:12pm UTC](https://forum.inductiveautomation.com/t/comparing-values-in-power-table/85130 "2024-02-01T23:12:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mia\_Galatis](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Mia\_Galatis](https://forum.inductiveautomation.com/u/Mia_Galatis)\
**Post date:** [February 1, 2024, 11:12pm UTC](https://forum.inductiveautomation.com/t/comparing-values-in-power-table/85130/1 "2024-02-01T23:12:51Z")

</div>

I have a power table and I want to compare the value of the two columns and if the values don't meet a certain criteria, I would like the color of the cell to change color. For example, if 'Average HTH' is less than 'HTH\_min' I would like the 'Average HTH' cells to be red. I know I have to use configureCell but I'm stuck from there. Any support?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/acb50355886b3f201f171055b8c529214e83ecc3.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [February 3, 2024, 8:37am UTC](https://forum.inductiveautomation.com/t/comparing-values-in-power-table/85130/2 "2024-02-03T08:37:57Z")

</div>

Just check to see if the column you want to compare is being evaluated, and compare its cell value to the corresponding column's value in the dataset:

```auto
#def configureCell(self, [...]):
	# can't see what the rest of the column name is or it would be if colName == 'Full Column Name'
	if 'Average of HTH_' in colName and value < self.data.getValueAt(rowIndex, 'HTH_min'): 
		return {'background': 'red'}

```
