Help & DocumentationCreating Dimensions Basic Dimensions Define and Use an 'Other' Dimension Value

Define and Use an 'Other' Dimension Value

You  may want to define a Dimension that enumerates only a limited set of the available values, with the rest of the values grouped under a catch-all 'Other' Dimension value.  For example, you may have three key products that make up most of your business, while the rest of the products can be collapsed into a single dimension.  You can do this in Metric Insights by writing a fetch command for your Dimension that creates this grouping.

This article shows you how to create, then use this Dimension when defining Metrics and Reports.  In this example, we define a Product Dimension and select three specific products for Dimension values while assigning the rest of the products to an 'Other' Dimension value.  

1. Access Content > Dimensions

Access Content > Dimensions

At the bottom of the screen click [+ New Dimension].

The Add Dimension pop-up opens.

1.1. Complete the fields essential for creating a new Dimension

Complete the fields essential for creating a new Dimension
  1. This example uses SQL as a Value Source.
  2. Bind parameter: Setting this to match the column name for the data in the source system makes writing fetch commands for Dimensioned element easier
  3. Save to proceed with creating a new Dimension. Once Saved, the Dimension Editor opens.

2. Create your Fetch command

Create your Fetch command
  1. Note how the CASE statements are used to surface the three desired products and to bucket the rest of the product into the "OTHER" Dimension with a key value of -1.
  • The first CASE statement maps all product_id values to "-1" except for 9, 10, and 50.
  • The second CASE statement selects the product names for the three products with product_id of 9, 10, and 50 and groups the rest of the products under "OTHER".
  1. Validate your Statement

2.1. Collect Dimension Values

Collect Dimension Values
  1. If your statement is valid, the statement box is green; if there are any errors, the box is colored in red and errors will be explained in the field below.
  2. Examples of data records are displayed below the SQL statement. Confirm that sample values shown in post-validation are the ones you have expected.
  3. If the values returned Collect Data

2.2. Dimension Values Grid will be populated

Dimension Values Grid will be populated

3. Write Element Data Fetch Commands for 'OTHER' Mapping

Write Element Data Fetch Commands for 'OTHER' Mapping

When writing a fetch command for a Metric or Report that uses this Dimension, include the same CASE statement logic used to select the key value for the Product Dimension.

0 Comments

Add your comment

E-Mail me when someone replies to this comment