Skip to content

Expressions

You can use an expression in a data grid. Simply make an expression using the expression editor, and left-drag it onto the data grid by its drag handle.

The diagram below shows a data grid that uses an expression as a column.

Data grid with a Holiday Profit Expression column calculated from booking data

In a similar way, you can add date/date time expressions into a data grid. For example, let's imagine that we want to identify the average for a person's booking date and travel date.

  1. Create the expression.

    Mean BDTD expression editor showing Mean(Booking Date, Travel Date)

  2. Left drag the expression onto a data grid by its drag handle and build.

    Data grid with the Mean BDTD expression built as a column

Banded date or datetime expressions

You can create and use a banded date or datetime expression as a column in a data grid. To access the banding options:

  1. Right drag your expression onto a data grid and select the required banding.

    Banding options menu, including Months, Quarters, Years, Weeks, and financial and age-based banding

    Once you select your banding option, you are presented with a second dialog in which you can set the start and end year for your date expression. By default, the start year is 2000 and the end year is five years from the current year.

    New Expression dialog with the start year set to 2000 and the end year set to five years from the current year

    Note

    Dates outside your selected start and end year range show as unclassified in the data grid.

  2. Build the display.

    Data grid with banded date expression columns added, showing the same expression banded by Day of Week, Month of Year, and Quarter of Year

Note

Significantly, this ability to add a banded date/date time expression directly as a column into a data grid removes the need for you to create a virtual variable.