---
title: "How to compare cells on the same row"
description: "Comparing cells on the same row requires creating a rule using path aliases with relative paths. This involves adding a column, defining path aliases, and setting a rule targeting those aliases for comparison."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360008132338-geneos-how-to-compare-cells-on-the-same-row/index.html"
---
You need to create a rule that uses [path alias](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#rules__rule__pathAliases) with a [relative path](https://docs.itrsgroup.com/docs/geneos/current/processing/gateway-administration/geneos_xpath_ug/index.html#Same_Row) of the other cells (columns).

1. Create an [additional column](https://docs.itrsgroup.com/docs/geneos/current/processing/configuration/gateway_samplers/#additional-data).

![usedInodes column](https://docscdn.itrsgroup.com/faq/images/geneos/usedInodes-additional-column.png)

2. Create a rule with a target as the path value of the entire newly added column.

![compare-same-row rule](https://docscdn.itrsgroup.com/faq/images/geneos/compare-same-row-rule.png)

You may use relative path on the target or the absolute (full) path. Sample relative path (slow on xpath evaluation):

```
//rows/row/cell[(@column="usedInodes")]
```

Sample absolute (full) path (fast on xpath evaluation):

```
/geneos/gateway[(@name="MNL_PUGO_GATEWAY_123")]/directory/probe[(@name="PUGO-NETPROBE")]/managedEntity[(@name="PUGO-MANAGED-ENTITY")]/sampler[(@name="disk_sampler")][(@type="")]/dataview[(@name="disk_sampler")]/rows/row/cell[(@column="usedInodes")]
```

For more information about xpath slow and fast evaluation, see [How do I avoid expensive XPaths that slow down my console and Gateway](https://docs.itrsgroup.com/docs/faq/geneos/115004022725-geneos-how-do-i-avoid-expensive-xpaths-that-slow-down-my-console-and-gateway/index.html).

3. Create path alias of the rows you want to compare.

![path aliases of rows](https://docscdn.itrsgroup.com/faq/images/geneos/path-aliases-nodes.png)

Sample path aliases:

Name: `totalInodes`
text: `../cell[(@column="totalInodes")]`

Name: `freeInodes`
text: `../cell[(@column="freeInodes")]`

4. Create your rule.

![usedInodes rule](https://docscdn.itrsgroup.com/faq/images/geneos/rule-target-usedInodes.png)

Sample rule:

```
set $(freeInodes) path "freeInodes" value
set $(totalInodes) path "totalInodes" value
value $(totalInodes) - $(freeInodes)
```

5. Output

![usedInodes column in disk sampler](https://docscdn.itrsgroup.com/faq/images/geneos/usedInodes-output.png)


