How to Convert Dimensions to Metrics in Custom Reports
Basic metrics that are available in the right sidebar during report creation, are not the only metrics that can be used in the report. All dimensions can be converted to a metric. Depending on what type of data is stored for the dimension there are different possible conversions.
Conversions for dimensions that contain string data type:
- Unique count – count unique occurrences of the dimension value
Example use case for the unique count is checking a number of countries for each operating system:
Conversions for dimensions that store numerical data (i.e. revenue or time on page):
In order to convert the dimension to a metric, you need to add that dimension to the report as on the example below for the flat table report:
For Explorer report remember to drag and drop dimension to the table rather than to Dimensions section where the report structure is designed. You can also convert dimensions in the chart type reports.
As a next step, click on that dimension to expand the menu and choose one of the available conversions:
After the selection, the dimension is converted to the metric – name and color of an element in the report creation tool are adjusted accordingly:
And named properly in the report view:
Date dimension grouping
The date is a specific case when it can be converted to other dimensions. Possible options are based on the way the data is grouped according to date.
Data can be grouped by:
- day of the week – data for the selected date range is grouped to weekdays, i.e. for a date range that contains few weeks, the data for Monday is a sum of all Mondays within the date range,
- name of the month – data for selected date range is grouped to months names, what means that for the date range that contains i.e. January ‘17 and January ‘18, data will be presented as the January and will contain the sum of both Januaries,
- hour of the day – data for selected date range is grouped to the hour of the day. If the date range contains multiple days, each hour has a sum for all of those days. It can be useful for building a histogram for measuring the traffic distribution on your website for a given period:
Below you can find examples for all possible groupings: