Add Column

The Add Column function allows you to create new columns for existing datasets.

When adding a new column, you must create a mathematical expression. This expression evaluates each row in the dataset to generate the new column.

In Studio, expressions are created using a combination of:

  • Column names, referencing the values of other columns in the table.
  • Constant values, such as numbers or strings.
  • Mathematical operators , such as plus, minus, or parenthesis. See the expression syntax reference.
  • Function calls to Studio's built-in library of mathematical and geospatial functions.

Add a New Column to Studio

Follow the steps below to add a new column in Studio:

1. Navigate to the Columns tab, select a dataset, then click Add Column.

The Add Column button in Studio.The Add Column button in Studio.

The Add Column button in Studio.

2. Write an expression in the field provided.

Provide a name at the top of the panel, the write an expression in the box below.

You can write your expression using simple math operators and column names. Click 🔍 Search then type to find more advanced functions.

A simple expression creating a column that combines high salary brackets.A simple expression creating a column that combines high salary brackets.

A simple expression creating a column that combines high salary brackets.

3. Click Confirm to create your new column.

The new column will appear on the top of the dataset's attribute columns.

Columns created in Studio have a badge, which you can click to open the Edit Column panel.

The new column the expression badge.The new column the expression badge.

The new column the expression badge.

Edit a Column

To edit a column, click the badge on a custom column, or click ⋮ More Options >> Edit Column.


Editing a column in Studio.

Examples

Compute the ratio of two attributes:

attribute_column_one / attribute_column_total;

Calculate the absolute value of a column with 20 subtracted:

abs(column_example - 20);

Index data to H3 at resolution 9:

geoToH3(lat, lng, 9);

Truncate a Placekey to just the Where Part:

substring(placekey, indexOf(placekey, '@'));

Pad a string with zeroes:

padStart(zip, 5, '0');

Find the centroid of a polygon:

centroid(_geojson);

Parse a string into a timestamp:

parseTime(time);

For additional guidance,visit the Expressions documentation.


Sign In