Set the Value of a Column
Set the Value of a Column
Here you can find our YouTube tutorial:
The value of a column can be set in the Report Editor:
To use the value of other columns the syntax is: {{column name}}
.
Access any other column you selected in Selection. Then you can use the value by surrounding the name with {{ }}
.
Evaluate Mathematical Expressions
You have the flexibility to use all functions listed on the math.js page. Instead of using math.evaluate, simply enclose your expression within double square brackets [[ ]]
.
For example:
Instead of math.evaluate (( {{item_unit_price}} * 100 ) / (100 + {{item_tax_rate}} ))
use [[ ( {{item_unit_price}} * 100 ) / (100 + {{item_tax_rate}} ) ]]
This format simplifies the usage of mathematical expressions.
Please be aware that math expressions are only functional in mappings or when combined with variables in custom fields. To write math expressions the syntax is: "[[math expression]]
".
There are (nearly) no limits. Here are some examples:
[[ 1.2 * ( {{Line items: Weight of product variant}} + 4.5) ]]
[[ sin(45 deg) ^ {{Line items: Quantity}} ]]
[[ {{Line items: Total price}} - ({{Line items: Total discount}}/1.2) ]]
If you need more complex functions, take a look at the function library we use.
Use DataChamp Functions
- Output the date of today:
Date(%Y%m%d)
For example, you can use this function to insert today's date into a custom column for every line in your export:
Add days: addDays(Date(%d.%m.%Y), 30)
. This function adds 30 days to the current date.
Updated on: 03/06/2025
Thank you!