Add a Calculated Column
A calculated column is a way to manipulate the data in a dataset by defining a new column of data that presents the raw information of one or more columns in a more meaningful way for users or analysts. Calculated columns can be used to make the following types of changes and to present the results as a column for reporting.
-
Data Transformation: When raw data is in a format that is not very meaningful for users, you can transform the format to a more meaningful value. For example, you could change a numeric date value like an epoch value into more human-readable date formats.
-
Data Enrichment: Adding meaningful information to the data. For example, your event data might include an enumerated value for an application service. You could use a SQL statement to enrich that value from a service number to a more readable string value, such as “Company email application.”
-
Data Validation: Correcting and validating data.
To add a calculated column:
-
Click the Calculated Columns tab.
-
Click Add Item to create a new entry for the column. Several fields appear. Note that the Is filterable and Is dimension fields are automatically selected.
-
In the Column header, click in the text and type a name for the column.
-
In the SQL Expression field, type a SQL expression for the new calculated field. This string also appears as a tooltip when a user hovers the cursor over the calculated column's "?" tooltip icon.
-
In the Label field, type a name for the calculated column. The label is the value that the end-users see in the user interface.
-
In the Description field, type a brief description of the calculated column. The description is also used as tooltip text when a user hovers the cursor over the calculated column's "i" tooltip icon.
-
In the Data Type field, select the data type for the calculated column’s value.
-
In the Datetime Format field, type the format of the date and time stamp in Python date time string format. Examples:
-
%m-%d-%Y= 02-27-2020
-
%a %d, %y = Tue 2, 2020
-
%x %X = 02/27/2020 17:41:00
-
%B-%Y = February-2020
-
Epoch_m = If date is an epoch integer
-
Certified By and Certification Details are optional fields that provide some record keeping about the persons or teams that reviewed and certified a metric or column, its calculations, and data.
-
Click Save. The calculated column is added to the dataset.
Updated 9 months ago