Formulas
You can use a formula to do calculations with a column of numbers, combining it either with another column or with a constant value. You can add, subtract, multiply or divide.
Formulas are similar to Derived fields in that the numbers in the formula column are not saved as Fields in your data. Instead, they are produced dynamically while you look at the table view. That means the numbers are always synchronized with your actual data — so there is no need to re-calculate the formula when you update the data.
To apply a formula, your Table view must have at least one column containing numeric data. If the column shows a field, it must contain recognized Number values, Money values, Date and time values or Duration values. Alternatively, you can apply formulas to other formula columns, or to columns containing numerically Derived fields, such as the number of entries in a list field.
How to apply a formula
- Click the header of the first column you wish to use in the formula to open its menu. Note that which column is first will affect the result for subtraction or division operations, so consider which order you want to apply the formula.
- Move your mouse over Formula to reveal the submenu containing the four arithmetic operations. Each operation contains a submenu showing the other columns and/or constant values that you can operate with. The columns available will depend on what type of numeric data is in the view:
- Number values and Money values can be combined through addition, subtraction, multiplication or division.
- You can add or subtract Duration values with other duration values or with number values to produce a new duration. (Dabble will assume the unit of a number value to be hours.) You can also multiply or divide duration values with number values to produce a new duration, and you can multiply two duration values to produce a duration squared or divide two duration values to produce a number with no unit.
- Where possible, you can add or subtract duration values with Date and time values to produce a combined date and time value. (For example, adding a duration of 5 hours to January 1, 2006 5:00 AM will result in January 1, 2006 10:00 AM.) You cannot multiply or divide with date and time values.
- Constants are only available for formulas with number values and money values.
- You can use the & operator to concatenate (combine) text fields.
- Click the formula you want to use and Dabble will calculate the values and add them to the view in a new column. If you choose a new constant, you will first be asked what you want the constant number to be.
Working with formulas
Columns containing formula-produced numbers are treated like any other column of numbers in Dabble. You can use them for sorting or grouping, you can apply subtotals to the column. You can also apply additional formulas to a column produced by a formula.
Creating a formula with more than two columns
If you wish to create a formula using three or more columns (e.g. A + B − C), you need to create the formula in steps. Begin with the first two columns you want to use using the steps shown above. Once you have the first result column (e.g. A + B), apply a formula to the new column to produce a new result — the result of the first formula in combination with the second (e.g. (A + B) − C).
You can repeat this process as needed to produce complex arithmetic formulas.
Removing a formula
To remove a formula you can simply hide the column from the view. The formula will continue to exist if you wish to add it again but will no longer be visible.
If you remove a constant from a view, any columns containing formulas with that constant will also be removed.
