Define and Use an 'Other' Dimension Value

If necessary, it is possible to define a Dimension that enumerates only a limited set of the available values, with the remaining 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 explains how to create anduse 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

At the bottom of the screen click [+ New Dimension] to open the Add Dimension pop-up

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

  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 the Statement

2.1. Collect Dimension Values

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

2.2. Dimension Values Grid will be populated

3. 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.


Add your comment

E-Mail me when someone replies to this comment