Derived Columns
Outline
Welcome
In Optimizely Analytics, derived columns let you extend your datasets with custom, computed values that aren’t available in your original source data. These calculated properties live inside Analytics and are defined using intuitive templates or custom logic—making it easier to extract richer insights from your events, users, and other business data.
Derived columns are tied to a specific dataset and can be used like any other column throughout the platform. Whether you're aggregating event counts, assigning user segments, or calculating time between key activities, derived columns offer the flexibility to enrich your data and power deeper analysis.
By the end of this module, you'll be able to:
Understand what derived columns are and how they differ from metrics.
Create and configure derived columns tied to specific datasets.
Use the block editor to define derived logic through templates or custom scripts.
Leverage various templates such as aggregation, conditional logic, and time-based calculations.
Apply derived columns across reports and visualizations using the Catalog.
What is a Derived Column?
A derived column is a computed field that you define within a specific dataset in Analytics. It does not exist in the source data but is built using the block editor or NetScript logic to add analytical value. Each derived column evaluates at the row level—meaning it calculates a value for every record in the dataset it's linked to.
For example, say you have a Users dataset and a related Events dataset. If the events contain a boolean vote column, you could create a derived column on the Users dataset to count how many times each user voted true. Once configured, derived columns behave like any other dataset column and can be reused wherever the Catalog is accessible in Analytics.
Key Configuration Details
Dataset: Each derived column belongs to exactly one dataset and cannot be moved.
Name: Must be unique within its dataset, including among metrics and cohorts.
Definition: Built using templates or a combination of blocks in the block editor.
Default Aggregation: Set a default rollup (like count, sum, or average) for cases where the column is used as a measure.
How to create a derived column
You can get started with a quick demo walkthrough on how to create a derived column using the block editor in Analytics: https://optimizely.navattic.com/80a089u
Types of Derived Columns
To streamline creation, Optimizely Analytics provides several template types for building derived columns. These templates let you work with filters, conditional logic, aggregations, and more—each tailored for a different type of analysis. You can change the selected template at any time without losing your work.
Aggregation / First / Last
Use this template to compute aggregated values like first event timestamp or total purchases per user.
Example: Create a derived column for each user’s signup date.
You can follow a step-by-step guide that shows how to create a derived column using this aggregation template: https://optimizely.navattic.com/le70uag
Conditional on Property
Use this to assign values based on a property using if/then logic.
Example: Tag users as "Liked" or "Disliked" based on their content interaction behavior.
See how to set this up using a demo walkthrough on conditional logic based on properties: https://optimizely.navattic.com/zb70rxt
Formula
Define complex derived logic using the NetScript language.
Example: Use a formula to calculate a custom engagement score across multiple event types.
You can walk through the creation of a formula-based derived column in this interactive demo: https://optimizely.navattic.com/8zt04z1
Custom
Build a flexible column by combining multiple blocks—perfect for layered logic or calculations.
Example: Compute the incremental revenue attributed to a campaign.
Check out how to build a custom derived column using the block editor in the demo walkthrough: https://optimizely.navattic.com/h2h0216
Conditional on Aggregate
Group actors based on the aggregate behavior and apply conditions to those groups.
Example: Label users as high-value based on total revenue or engagement.
Explore the demo for creating conditional-on-aggregate derived columns using this template: https://optimizely.navattic.com/sf5f0o7f
Previous / Next Value
Look up an actor's previous or next event value, optionally filtering by event type.
Example: Capture the last campaign type viewed before a conversion.
See how to configure a previous/next event lookup in this hands-on tutorial: https://optimizely.navattic.com/jiw0fpa
Time Since
Calculate the elapsed time since a timestamp-based event.
Example: Compute time since last signup or last content interaction.
A demo walkthrough will guide you through creating this time-based derived column: https://optimizely.navattic.com/2y1201l8
Need more help?
Dive deeper into derived columns in the Optimizely documentation on Derived Columns.