Examples of calculated columns
You can get more information about the data by making calculations based on the existing data columns in the data table. A calculation can contain mathematical as well as logical expressions. The following examples give you an idea of how calculated columns can be used to retrieve more information about your data.
See also Evaluations of expressions.
- Simple conversion and formula calculations
You might want to, for example, perform unit conversions of the values in a data column, or use formulas to calculate new values, and then add the results as values in a new data column. - Calculations of time differences
Sometimes the columns in a data table show different time points, but what is interesting is not the actual start and stop points. Instead you want to know how long different time periods lasted. - Ranking
You might want to assign a ranking number to the values within a data column. - Calculated columns based on conditions
When you calculate columns, you might want different results of an expression depending on whether certain conditions are fulfilled or not. Conditions can be set up in expressions by using the logical functionsIf()
orCase()
.
- Simple conversion and formula calculations
You might want to, for example, perform unit conversions of the values in a data column, or use formulas to calculate new values, and then add the results as values in a new data column. - Calculations of time differences
Sometimes the columns in a data table show different time points, but what is interesting is not the actual start and stop points. Instead you want to know how long different time periods lasted. - Ranking
You might want to assign a ranking number to the values within a data column. - Calculated columns based on conditions
When you calculate columns, you might want different results of an expression depending on whether certain conditions are fulfilled or not. Conditions can be set up in expressions by using the logical functionsIf()
orCase()
.
Parent topic: Calculated columns