Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A custom column is a column that is computed from other columns using a formula. If you need more flexibility for adding new columns than the ones provided out of the box in Exportier, you can create your own custom column. This feature is available only for Professional and Unlimited plans.

Let's assume that you have a report with the following columns:

Using the Price and the Inventory item: Unit cost columns, you'd like to create a new column Profit calculated by subtracting the Inventory item: Unit cost column from the Price column.

The goal is to create a report with a new Profit column:

Add a custom column

To add a new custom column, click the Add custom column button at the top right corner of the COLUMNS section.

You will see a modal window where you define the column name and the formula to calculate a value.
After specifying all the needed data, click on the Apply button.

You can find your custom column in the columns list.

How to edit or remove a custom column

To edit or remove a custom column, click the Edit or the Remove button, which appears after moving the cursor on the column item.

Anchor
how-to-build-a-formula
how-to-build-a-formula

How to build a formula

Currently, we support several expressions in the formula:

Anchor
math-expression
math-expression

Math expression

Math expression allows you to specify calculations using other column references, individual numbers, or both. In math expression, you can use a reference to any regular column. Currently, we support several math operators in the math expression:

  • + addition

  • - subtraction

  • * multiplication

  • / division

You can also use parentheses to order your operations in the math expression.

Note

Using reference to a custom column is not allowed.

How to use: Place math expression in double square brackets.

Syntax: [[ expr ]]

Examples:

  • [[ 23 + -44 ]]

  • [[ (10000.43 + 789.317) * 10 * (123 + 42.31) ]]

  • [[ {{ Price }} * 2 ]]

  • [[ {{ Price }} - {{ Inventory item: Unit cost }} ]]

  • [[ ({{ Price }} - {{ Inventory item: Unit cost }}) * 2 ]]

Anchor
column-reference
column-reference

Column reference

Column reference is an expression that specifies what column value should be used. It can be used as part of math expression or on its own.

How to use: Place the column name which you want to refer to in double curly brackets.

Syntax: {{ column_reference }}

Examples:

  • {{ Price }}

  • {{ Title }}, {{ Description }}

  • [[ {{ Price }} * 2 ]]

  • [[ {{ Price }} - {{ Inventory item: Unit cost }} ]]

  • [[ ({{ Price }} - {{ Inventory item: Unit cost }}) * 2 ]]

Anchor
literal
literal

Literal

Literal is any char outside of column reference enclosing and math expression enclosing. In the report file, it will be displayed as it is in the formula.

Examples:

Formula

Literals (highlighted in bold)

Price is {{ Price }} $

Price is {{ Price }} $

Description: {{ Title }}, {{ Description }}

Description: {{ Title }}, {{ Description }}

Doubled price: [[ {{ Price }} * 2 ]] $

Doubled price: [[ {{ Price }} * 2 ]] $

[[ {{ Price }} - {{ Unit cost }} ]]$ is my profit

[[ {{ Price }} - {{ Unit cost }} ]]$ is my profit

Expression composition

You can compose a formula by using multiple expressions, and you can use every expression several times.

Examples:

  • {{ ID }} {{ Title }} [[ (10 + 22.334) - (424.03 - 123) ]] $

  • Doubled price: [[ {{ Price }} * 2 ]] and doubled profit: [[ ({{ Price }} - {{ Inventory item: Unit cost }}) * 2 ]]

Errors

In some cases, you will see the ERROR word or the NaN word in the custom column cell (in the report file). These are error types, and each of them has a specific meaning.
ERROR means that your formula is invalid or contains a reference to the not selected/not existed column.
NaN (Not a Number) means some issues with math calculations. One example is division by zero.