Creating a Compound Dimension

A Compound Dimension is created by combining all or selected Dimension Values from two existing Dimensions.  A Metric and Report may be Dimensioned using a Compound Dimension that results in one instance of the element for each combination of Dimension Values fetched in a ResultSet.

When creating a new Compound Dimension, one of the Dimensions is designated as the Primary and the other as the Secondary Dimension.  Only 'bulk loading', that is, automatically collecting all values with one query, is supported.  As with any Dimensions, Dimension Values may also be entered manually or uploaded from a CSV file.

1. Access Admin > Contents > Dimension

Access Admin > Contents > Dimension

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

2. Provide basic information for a new Compound Dimension

Add Dimension pop-up screen layout will appear as below after you set Combines existing Dimensions to Yes.

  1. Set Combines existing dimension to 'Yes'
  2. Select Primary Dimension and Secondary Dimension
  3. Include: Define how Dimension Values are to be populated.
    • values generated from element data:  This solution allows creating Dimension Values "on the fly" as elements using this Dimension are run. This generates the list of Dimension Values based on the combinations of the two Dimensions that have actual data.
    • selected values: control what compound values are added to this Dimension. If you choose "Selected Values", provide a list of Dimension Values in order to complete this Dimension. In later versions, you can select to have the system create the Compound Dimension values based on all combinations the existing Dimensions.
  4. Assign access from component dimensions to grant access to this Composite Dimension:
    • 'Yes':  Any user with permission to access BOTH the Primary and the Secondary Dimensions automatically receives access to instances of this Composite Dimension where the combination of the Primary and Secondary Dimension Values; that is, if the User has full access to both included Dimensions, then all instances are visible to the user.  If the user has selected Dimension Values access to either of the Dimensions, the access is only granted to the combined instances where the user has access to both Dimension Values
    • 'No':  A user must be granted access to the Composite Dimension in the same manner as to any other Dimension

Save your entry to open the Dimension Editor and allow you to determine how the Values are to be populated

2.1. [Option 1] Populate Selected Values manually

[Option 1] Selected Dimension Values
  1. Include: choose to add 'selected values'
  2. Scroll down to the bottom of the page and click [+ New Value]
  3. The Add Compound Dimension Value screen opens
  4. Add Compound Values by selecting (pairing) from the Primary Dimension Value and Secondary Dimension Value drop-down lists
  5. Save your combination and it will appear in the Dimension Values table

You can keep adding values one-by-one or upload them as a CSV file (see below).

2.2. [Option 2] Populate Selected Values via CSV file

Uploading selected values via a CSV file
  1. Click Load from file button below the Compound Dimension Values table
  2. The Load from File pop-up opens
  3. Confirm that the Delimiter character is the same as in your CSV file
  4. Select the CSV file containing your data from your directory
  5. Click Import

NOTE: If you want to enter values via a CSV file and you are unsure about its format, click sample CSV file link to obtain a file, save it and enter data into the spreadsheet.

NOTE: If any errors are encountered in the CSV file, the system will provide information about the issues found

  1. Click OK to close the results pop-up
  2. Click Cancel to close the Load from File pop-up and cancel file upload

All the successfully processed values are added to the Compound Dimension Values table.

3. [Option 3] Generate values from element data

[Option 2] Generate values from new dimensioned Elements
  1. Include: select to add 'values generated from element data'
  2. The Compound Dimension Values section is empty until it is populated automatically after  an element using this Dimension Value has been created

3.1. Create an element using this Dimension

Create an element using this Dimension
  1. Create a Dimensioned element using the Compound Dimension. See Creating Dimensioned Metrics and Reports for more instructions.
  2. Fetch the data for your element. In the given example we use a SQL database as a Data Source, so we need to construct a SQL statement. You can also provide the element content via Manual data / CSV file or via Plugin command for elements sourced from External Services.
  3. Save and update your element

3.2. Return to the compound dimension you have created in the first steps.

Compound Dimension values are going to be automatically populated

.The Compound Dimension Values table should be populated with new values.

4. [Option 4] Populate Selected Values automatically [new in Version 5.5]

Screen layout below will appear after you set

  1. Combines existing Dimensions to Yes
  2. Include  to  selected values  

Note: format of screen differs slightly from prior versions

Save will open the full Dimension Editor

4.1. The system will automatically generate the correct SQL statement for you

All you need to do is:

  1. Check Data to validate results
  2. Collect Values to create the compound Dimension Values

4.2. Values will automatically be generated (edit the Dimension again)

  1. Options beneath the list of Values will allow you to modify or remove the Values