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
- This example uses SQL as a Value Source
- Bind parameter: Setting this to match the column name for the data in the source system makes writing fetch commands for Dimensioned element easier
- Save to proceed with creating a new Dimension. Once Saved, the Dimension Editor opens
2. Create your Fetch command
- 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"
- Validate the Statement
2.1. Collect Dimension Values
- 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
- Examples of data records are displayed below the SQL statement
- Confirm that sample values shown in post-validation are as expected
- If the values returned Collect Data