Show Menu
TOPICS×

Numeric Dimensions

A numeric dimension consists of ordered, numerical elements and has a one-to-many relationship with its parent countable dimension.
You can think of a numeric dimension as a representation of the numeric properties of the parent dimension's elements. For example, if you are working with web data, you could define the numeric dimension Session Revenue, which defines an amount of revenue, in dollars, for each session in the Session dimension. Each session has a single amount of associated revenue, but several sessions can have the same amount of associated revenue. Therefore, the Session Revenue dimension has a one-to-many relationship with the Session dimension.
Numeric dimensions are often used to define metrics that sum values, count occurrences of a condition, or locate a minimum or maximum value. For example, a metric named "Revenue" might be defined using the Session Revenue dimension: sum(Session_Revenue, Session). Defined this way, the Revenue metric would give the total amount of revenue for the selected sessions.
Numeric dimensions cannot be parents of other dimensions.
Numeric dimensions are defined by the following parameters:
Parameter Description Default
Name Descriptive name of the dimension as it appears in data workbench. The dimension name cannot include a hyphen (-).
Clip Values True or false. Specifies whether the input value (after Operation ) is to be clipped to be between the values of Min and Max. If Clip Values is true, the value is clipped to that range. If Clip Values is false, no value is returned for the element of the parent dimension.
Comments Optional. Notes about the extended dimension.
Condition The conditions under which the input field contributes to the creation of the numeric dimension.
Fixed Size True or false. Controls the number of elements in a dimension (cardinality). If true, all elements from Min to Max are included in the dimension. If false, the dimension's size grows as values are added. false
Hidden Determines whether the dimension appears in the data workbench interface. By default, this parameter is set to false. If, for example, the dimension is to be used only as the basis of a metric, you can set this parameter to true to hide the dimension from the data workbench display. false
Input
The value to use with the specified Operation or the input value for which you want to count occurrences.
If this field is a vector of strings, the evaluation occurs for each element in the vector. So for example, a vector with length 3 and an Operation of COUNT adds 3 to the count.
Min Lower limit on the final dimension result. 0
Max Upper limit on the final dimension result. 1e6
Offset See Scale in this table. 0
Operation
Available operations are as follows:
  • COUNT: The total number of nonblank values in the Input field across all log entries that meet the dimension's Condition is used. If the Input field is a vector field, the total number of nonblank values in each log entry is counted.
  • FIRST NONBLANK: The first non-blank input value is used, regardless of whether it comes from the first log entry. If Input is a vector field, the first row in the vector for the relevant log entry is used. If the value is not a number, no value is used.
  • FIRST ROW: The value for the first log entry related to the parent dimension element is used, even if the input is blank. If Input is a vector field, the first row in the vector for the relevant log entry is used. If this value is blank or not a number, or if the relevant log entry does not meet the dimension's Condition, no value is used.
  • LAST NONBLANK: The last non-blank input value is used, regardless of whether it comes from the last log entry. If Input is a vector field, the first row in the vector for the relevant log entry is used. If the value is not a number, no value is used.
  • LAST ROW: The value for the last log entry related to the parent dimension element is used, even if the input is blank. If Input is a vector field, the first row in the vector for the relevant log entry is used. If this value is blank or not a number, or if the relevant log entry does not meet the dimension's Condition, no value is used.
  • SUM: The total of all the numeric values in the Input field across all log entries that meet the dimension's Condition is used. If there are no such log entries or no numeric values found, the numeric value 0 is used.
  • MIN or MAX: The minimum or maximum numeric value found in the Input field across all log entries that meet the dimension's Condition is used. If there are no such log entries or no numeric values, no value is used.
Note: You should specify an operation to ensure that the dimension is defined as intended.
Parent The name of the parent dimension. Any countable dimension can be a parent dimension.
Scale
To yield the ordinal value of the dimension, the result of Operation is transformed as follows:
(scale * input) + offset
1.0
If Operation yields no value, or Clip Values is false and the value is not between Min and Max, no element of the numeric dimension is related to the element of the parent dimension.
This example illustrates the definition of a numeric dimension using event data collected from website traffic. This numeric dimension, named "Ad View Counter," counts the number of times that the visitor sees an advertisement during a given session. The assumption is that all advertisement resources are requested from the web server with ad= as part of the cs-uri-query. In the example, the number of times (COUNT) that the visitor is presented with an advertisement is the value of interest, not the actual value in the field.