Formulas

Account Summary & Custom Formulas

Custom formulas for filtering

One might want to use this technique when monitoring multiple accounts for risk conditions, and filter a view to just those accounts that meet the condition.

  • Have both the Account Summary and the new Formulas widget open
  • Create a new formula by hitting the + button in the toolbar, the Formula dialog will open.
  • Give your formula a name
  • Use the prefix "account." for different account values and simple math operators to construct a formula
  • In this example, we are creating a filter to show accounts with a negative balance
  • To use the formula as a filter, check the "Condition" box
  • Save the formula
  • Go to the filters menu in the Account Summary view and choose the filter you just created

Custom formulas for custom columns

One might want to use this technique to create a column to display some risk algorithm that indicates when accounts might be getting into trouble.

  • From the task menu, or from the +Column tab in the Column manager dialog, create a new formula, the formula dialog will open.
  • Give your formula a name
  • Use the prefix "account." for different account values and simple math operators to construct a formula
  • In this example, we are creating a column showing purchasing power minus margin, shown as a percentage
  • Save the formula
  • Because we started the formula from the +Column tab, once the formula was saved it was added to the "In window" tab

Formula Operators

Currently formula editor supports elementary operations:

"||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%"

"-", "!", "~", "+"

Parentheses are also supported.

  • Math operators
  • Unary negation ( - )
  • Unary plus ( + )
  • Multiplication ( * )
  • Division ( / )
  • Subtraction ( - )
  • Remainder ( % )

 

Comparison operators

  • Equals ( == )
  • Not equals ( != )
  • Less ( < )
  • Greater ( > )
  • Less OR Equal ( <= )
  • Greater or Equal ( >= )

 

Boolean operators

  • OR ( || )
  • AND ( && )
  • NOT ( ! )

 

Bitwise operators

  • AND ( & )
  • OR ( | )
  • XOR ( ^ )
  • NOT ( ~ )
  • LEFT SHIFT ( << )
  • RIGHT SHIFT ( >> )
  • ZERO-FILL RIGHT SHIFT ( >>> )