Creating a virtual field
To create a virtual field, follow these steps:- Go to the Datasets tab.
- Select the dataset where you want to create the virtual field.
- Click the
Virtual fields icon in the top right. You see a list of all the virtual fields for the dataset.
- Click Add virtual field.
- Fill in the following fields:
- Name and Description help your team understand what the virtual field is about.
- Expression is the formula applied to every event to calculate the virtual field. The expression produces a result such as a
boolean
,string
,number
, orobject
. The Preview section displays the result of applying the expression to some of your data. Use this section to verify the expression and the resulting values of the virtual field.
Usage
Visualizations
Virtual fields are available as parameters to visualizations but, as the type of a virtual field can be any of the supported types, it’s important to make sure that you use a virtual field that produces the correct type of argument.Filters
Virtual fields are available in the filter menu and all filter options are presented. It’s important to ensure that you are using a supported filter operation for the type of result your virtual field produces.Group By
Virtual fields can be used for segmentation in the same way as any standard field.Reference
Virtual fields are APL expressions and share all the same functions and syntax as APL expressions. For more information, see Introduction to APL. The list of APL scalar functions:- String functions
- Math functions
- Array functions
- Conversion functions
- Hash functions
- DateTime/Timespan functions
- Rounding functions
- Conditional functions
- IP functions
Virtual fields may reference other virtual fields. The order of the fields is important. Ensure that the referenced field is specified before the field that references it.