Functions—Defining new measures

As of release 2.3, Antaeus lets you add new measures to your cube, which are functions of existing measures, without your having to go back to Excel and start over again. This eliminates the need to update an external data source, such as a spreadsheet, and then rebuild the cube from it. Also, Antaeus can create the new measures for however many records memory will support, which far exceeds the record limitations of most, if not all, spreadsheet applications.

The new measures are called function-measures. A function-measure behaves exactly the same as measures created with the cube, but it has the additional property that it can be removed. In any window where measures are listed, function-measures are listed last and highlighted by a light yellow back color.

A function-measure is created and added to the cube in the Functions SV (SynchroView). You must first define a function. This is a mathematical expression made up out of variables, constants, operators (+, -, x, /, ^) and parentheses in the conventional manner. A variable is either an existing measure (denoted by the measure's ID) or one of the mathematical functions currently supported, which are:

abs( ) absolute value
exp( ) exponential (inverse of nlog)
log( ) base 10 logarithm
nlog( ) natural logarithm (base e = 2.718...)
sqr( ) square root

These mathematical functions operate on any numeric value or measure. More will be made available in future releases.

Once the function has been defined to your satisfaction (its syntax is verified and its values computed, listed, and visualized as a quantile plot), you can name the new measure and add it to the cube. It will now be used in the same manner as any existing measure.

As an example, here are the quantile plots for Max Temp (measure ID m10) and Min Temp (m11) in the Weather Data demo cube, installed with Antaeus:

You can define the function "m10 – m11" and name it Temp Range. Here is its quantile plot and associated histogram:

Once the new measure has been added, it can be used as a variable in defining other function-measures. Moreover, should you remove the measure that was so used, this will not impact any measures that referenced it because when new measures are added, the computed data values become part of the cube, so the reference is no longer needed.

Adding a new measure is a very efficient process and even with millions of records it is quickly accomplished. It is your responsibility to define a function that is well behaved, but should errors such as divide-by-zero or square roots and logs of non-positive values occur, those values can be flagged as "invalid" (default) or replaced with the value "0" in the newly created measure, depending on the requirements of your data.

As mentioned above, function-measures are used like any other measure. They can be plotted against other measures, and used to define subsets and partitions. And they can be added and removed as needed without ever impacting the cube's original data.

Read More or Download Antaeus