Many analyses you might want to create involve the use of a new column that you want to group by
or filter by
. The Creating Calculated Columns tutorial covers the basics for most use cases, but you may want calculated column that is a bit more complex than what the Data Warehouse Manager can create.
These types of columns can be created by the Adobe team of Data Warehouse analysts. To define a new calculated column, provide us with the following information:
definition
of this column (including inputs, formulas, or formatting)table
that you would like to create the column onexample data points
that describe what the column should containHere are some common examples of advanced calculated columns that users often find useful:
This is called an event number calculated column. This means you are trying to find the sequence in which events occurred for a particular event owner, like a customer or user.
Here is an example:
event\_id |
owner\_id |
timestamp |
Owner's event number |
---|---|---|---|
1 | A |
2015-01-01 00:00:00 | 1 |
2 | B |
2015-01-01 00:30:00 | 1 |
3 | A |
2015-01-01 02:00:00 | 2 |
4 | A |
2015-01-02 13:00:00 | 3 |
5 | B |
2015-01-03 13:00:00 | 2 |
An event number calculated column could be used to observe differences in behavior between first-time events, repeat events, or nth events in your data.
Want to see the Customer’s order number column in action? Click the image to see it used as a Group By dimension in a report.
To create this type of calculated column, you need to know:
owner\_id
in this example)timestamp
in this example)This is called a date difference
calculated column. This means you are trying to find the time between two events belonging to a single record, based on the event timestamps.
Here’s an example:
id |
timestamp\_1 |
timestamp\_2 |
Seconds between timestamp\_2 and timestamp\_1 |
---|---|---|---|
A |
2015-01-01 00:00:00 | 2015-01-01 12:30:00 | 45000 |
B |
2015-01-01 08:00:00 | 2015-01-01 10:00:00 | 7200 |
A date difference calculated column could be used to create a metric which calculates the average or median time between two events. Click the image below to check out how the Average time to first order
metric is used in a report.
To create this type of calculated column, you need to know:
This is called a sequential event comparison. This means you are trying to find the delta between a value (currency, number, timestamp) and the corresponding value for the owner’s previous event.
Here is an example:
event\_id |
owner\_id |
timestamp |
Seconds since owner's previous event |
---|---|---|---|
1 | A |
2015-01-01 00:00:00 | NULL |
2 | B |
2015-01-01 00:30:00 | NULL |
3 | A |
2015-01-01 02:00:00 | 7720 |
4 | A |
2015-01-02 13:00:00 | 126000 |
5 | B |
2015-01-03 13:00:00 | 217800 |
A sequential event comparison can be used to find the average or median time between each sequential event. Click the image below to see the Average and Median time between orders metrics in action.
=
To create this type of calculated column, you need to know:
owner\_id
in the example)timestamp
in this example)A currency conversion calculated column converts transaction amounts from a recorded currency to a reporting currency, based on the exchange rate at the event time.
Here is an example:
id |
timestamp |
transaction\_value\_EUR |
transaction\_value\_USD |
---|---|---|---|
1 |
2015-01-01 00:00:00 | 30 | 33.57 |
2 |
2015-01-02 00:00:00 | 50 | 55.93 |
To create this type of calculated column, you need to know:
A timezone conversion calculated column converts the timestamps for a particular data source from their recorded timezone to a reporting timezone.
Here is an example:
id |
timestamp\_UTC |
timestamp\_ET |
---|---|---|
1 |
2015-01-01 00:00:00 | 2014-12-31 19:00:00 |
2 |
2015-01-01 12:00:00 | 2015-01-01 07:00:00 |
To create this type of calculated column, you need to know:
Not to worry. Just because it is not listed here does not mean it is not possible. The Adobe team of Data Warehouse Analysts can help.
To define a new calculated column, submit a support ticket with details on exactly what you would like to build.