Easy Insight Logo
Easy Insight Logo
Call 1-(720)-316-8174

Scripting Concepts


Easy Insight uses its own simple scripting language for custom fields, conditional formatting, and advanced report customization. We've tried to keep it as similar to other standard scripting languages as possible.

You'll reference your fields in the various calculations surrounded by brackets, so to reference your Revenue field, you would do [Revenue] in your calculation.

Functions are what you'll use to perform different logic around your fields. To use a function, you start by adding the function name to the calculation. You'll then need to add a number of parameters to the function, surrounded by parantheses. For example, you can make a text value all upper case by doing upper([text field]). Even if the function doesn't take any parameters, you'll still need to put in an empty set of parantheses--for example, nowdate().

Common Calculation Examples

Duration Between Two Dates

if ([Date2] != null() && [Date1] != null(), [Date2] - [Date1], null())

Calculating a Percentage

[Measure1] / [Measure2] * 100

Parse a Date from a Text Field

parsedate([date field], "yyyy-MM-dd")

Format a Text Date from a Date Field

dateformat([date field], "yyyy-MM-dd")

First Three Characters of a Grouping

substring([Grouping], 0, 3)

Days Between Two Dates

daysbetween([Date1], [Date2])

Days Between a Start Date and Now

daysbetween([Date1], nowdate())

Value Found Within Square Brackets


Named Value Found Within Square Brackets

namedbracketvalue([Field], "Channel")