Adaptable Blotter Calculated Columns
Visualise your data in new, exciting and creative ways.
Some functions in AdaptableBlotter.JS are present in other advanced financial blotters, though we provide an implementation that is either more intuitive (e.g. Flashing Cells), more configurable (e.g. Conditional Styles), more user-friendly (e.g. Smart Edit) or more powerful (e.g. Advanced Search).
But other AdaptableBlotter.JS functions are genuine game-changers. They provide our users with functionality that is new and ground-breaking, enabling them to be more productive and efficient than ever before. Audit Log is one such function. The newly released Calculated Columns is another; quite simply it sets the new standard in how a Blotter can help users to understand, map and analyse their data.
Calculated Columns are, simply, bespoke columns created at run-time. The value of the column is a mathematical Expression (written using a maths library). The Expression can reference as many existing columns, and contain as many different mathematical operators, as is required.
Once created, the Calculated Column becomes part of the grid and is treated like any other column: it can be moved, hidden, styled, filtered, used in searches etc.
In the example below we have created 2 Calculated Columns and then referenced them in other functions:
- 'Change Type' which displays different text depending on the 'Change On Year' column value - the expression is: Col("changeOnYear") > 40 or Col("changeOnYear") < -40 ? "Big Change" : "Small Change". It also has 2 conditional styles applied which colour the font depending on the column value.
- 'Best Offer' which shows whichever value is greater in the Ask or BloombergAsk columns - the expression is round(max(Col("ask"), Col("bloombergAsk")), 4). This Calculated Column has had Flashing Cell applied so it flashes each time its value changes.
Real-time Updates
The value in the Calculated Column re-calculates and updates in real time as the other columns referenced in the expression themselves update.
The name of the Calculated Column – and the associated Expression – are stored in the user's storage just like all other items which are created using AdaptableBlotter.JS. And, of course, the column is available when the application is next opened.
Mathematical Expression
The Expression in the Calculated Column will typically include one or more mathematical operators. A huge selection is available including:
- Basic Operators: >, <, =, +, -, *, / etc.
- Min, Max: excellent for when wanting to select the highest or lowest value from multiple columns (e.g. when using historical data, or if there are multiple prices)
- Advanced Operators: abs, log, sin, sqrt, pow, derivative, etc.
- Unit Conversion: e.g. between different times, length measurements, mass etc. (A future enhancement will allow users to plug in their own conversions enabling them, for example, to convert between currencies at run-time).
Scenario Analysis
The Expression can also include static values e.g. [Col(“spread”) * 1.5].
This is very useful for scenario and 'what if' analysis type situations, where a user might want to create 2 or 3 associated Calculated Columns to see what the effect would be if certain input values were amended.
Endless Possibilities
Indeed, the possibilities and potential use cases are truly endless and empowering: Calculated Columns provides our growing user-base with the ability to visualise, analyse and structure their data in ways that no other grid makes possible.
Try out Calculated Columns for yourself at our demo site.
Read more about this, and other, AdaptableBlotter.JS functions, at our website.