---
title: "How to convert Disk sampler freeSpace from MB to GB"
description: "Disk sampler freeSpace values are displayed in MB by default and can be converted to GB. You can add a new column in the Disk sampler and use a gateway rule with the format() function for conversion."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004029489-geneos-how-to-convert-disk-sampler-freespace-from-mb-to-gb/index.html"
---
Users can add a new column to the Disk sampler. Then create a gateway rule to populate the desired unit with compute engine function `format()`.

First, go to the Disk sampler's **Advanced** tab. Enter the same name of the sampler under **Dataviews**, and select the **Additions** button.

![Disk name of sampler](https://docscdn.itrsgroup.com/faq/images/geneos/disk-name-sampler.png)

You can create a new column named freeSpace in GB.

![freeSpace in GB column](https://docscdn.itrsgroup.com/faq/images/geneos/free-space-gb.png)

Then, create a new gateway rule and go to the **Advanced** tab. Under the **Path Aliases** option, create a new one that points to the freeSpace column. In the Rule Block, you can make use of the `format()` function for the conversion.

```
value format("%0.2f GB", path "freeSpace" value / 1024)
```

We have provided the [gateway rule in XML format](/faq/downloads/geneos/Disk_freeSpace_to_GB.xml.txt) for reference.

Below is the result on Active Console.

![Free space result in Active Console](https://docscdn.itrsgroup.com/faq/images/geneos/free-space-active-console.png)

For more information, check the documentation about [Compute engine](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#compute-engine) and [Gateway Rule format() function](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#format).


