> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.datachamp.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Set the Value of a Column


### ${color}[#1a63ba](Set the Value of a Column)

Here you can find our YouTube tutorial: 


${youtube}[](57rzXLUCbng)

The value of a column can be set in the Report Editor: 

* [Layout](/en/article/layout-ta297n/)
* [Mappings](/en/article/mappings-fhp4u7/)
* [Rows](/en/article/rows-ldz7w7/) (only for position "after each new item" and "before each new item")

#### ${color}[#1a63ba](Access Selected Columns and Evaluate Mathematical Expressions)

1. Insert a column value
* Find the field you need (browse or search), e.g. Current total price
* In a custom column, reference it using double curly braces: `{{Current total price}}`
||| The name must match the column name in the Layout tab exactly (spelling and spaces). Best practice: copy & paste the name.


2. Apply a mathematical expression
You have the flexibility to use all functions listed on the [math.js](https://mathjs.org/docs/expressions/syntax.html) page. Simply enclose your expression within double square brackets `[[ ]]`.
![](https://storage.crisp.chat/users/helpdesk/website/-/d/0/0/f/d00f55635133d800/scr-20260204-jlol_1zevg6.png)
3. **Important notes**
* Math expressions work only in mappings or custom fields with variables
* Syntax always follows this structure: `[[ formula with {{column names}} ]]`

4. **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](https://mathjs.org/docs/expressions/syntax.html).


#### ${color}[#1a63ba](Use DataChamp Functions)


| Please check [Date Format](/en/article/date-format-o18ibr/) for more details.

For example, you can use the function `Date(%Y-%m-%d)` to insert today's date into a custom column for every line in your export:
![](https://storage.crisp.chat/users/helpdesk/website/-/d/0/0/f/d00f55635133d800/scr-20260204-jtlh_45sdae.png)
Add days: `addDays(Date(%d.%m.%Y), 30)`. This function adds 30 days to the current date. ![](https://storage.crisp.chat/users/helpdesk/website/-/d/0/0/f/d00f55635133d800/scr-20260204-jsif_ipbsyd.png)
