# Calculated Values (Formulas)

RowShare calculated columns are formulas based on the value of the other cells of the same row. Add a "Calculated value" column and specify the formula in this column’s settings. Yes, this means that the formula will always be the same in a given column.

Start by adding a new column to your table, and click "Automatic" and “Calculated Value”. Give a name to your column, and scroll to the bottom to enter the formula:

Calculated values can include 4 types of content:

**References to other columns**, by its name, surrounded by squared brackets [ ]. Examples:

- [Name]
- [Customer Name]
- [Price]

**Constant values **such as numbers or text. Text must be surrounded by double quotes. Examples:

- 1
- 878
- "Dr"

**Operators**

- 4 standard mathematic operations: +, -, *, /
- Comparison operators: >, <, >=, <=, =, !=, <> (the last two ones are equivalent and mean "not-equal")

**Functions **(IF, ISNULL…)

**IF**takes 3 parameters: 1^{st}is the condition, 2^{nd}is the result if the condition is met, the 3^{rd}is the result otherwise.

Example: to specify in a cell 1 if another cell is positive, and -1 if it is null or negative, use:`IF(Cell1 > 0, 1 , -1)`

**ISNULL**takes 2 parameters: if the first one is NULL (empty cell), it will return the second parameter. If the first one is not null, it will be returned.

Example: if you want to add the last name to the first name, but you are not sure if there is a first name, you should use:`ISNULL([First Name],"") + " " + [Last Name]`

## Examples

· **Numbers: **To calculate the sum of two columns *Total Price*and *VAT*, the formula is: `[Total Price] + [VAT]`

· **Text: **To combine the columns *First Name* and *Last name*together, the formula is: `[First name] + [Last name]`

Of course, it would look better with a space between first name and last name. Add it between double quotes: `[First name] + " " + [Last name]`

## Notes

- In any calculation, if you include an empty cell, the formula will not function properly and will return an empty cell. To avoid this, use
`ISNULL()`

. - Calculated values can not reference other calculated values.
- Calculated values do not function if referenced column names include one of the following characters:
- .
- \
- [
- ]

- You can show calculated field as percentage: go to the column settings by clicking on the settings button on the header of that column, change your column type to “Advanced”, set the data type to “Number”, and you will find “Percentage” box, set it as “Yes”.