Create a Compound Dimension (for all or selected Dimension Values)
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 Result Set.
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
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
- Set Combines existing dimension to 'Yes'
- Select Primary Dimension and Secondary Dimension
Include: Define how Dimension Values are to be populated.
- values generated from element data: the table is populated by the system. 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.
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
3. Adding Dimension Values
[Option 1] Selected Dimension Values
- Include: choose to add 'selected values'
- Scroll down to the bottom of the page and click [+ New Value]
- The Add Compound Dimension Value screen opens
- Add Compound Values by selecting (pairing) from the Primary Dimension Value and Secondary Dimension Value drop-down lists
- 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).
Uploading selected values via a CSV file
- Click Load from file button below the Compound Dimension Values table
- The Load from File pop-up opens
- Confirm that the Delimiter character is the same as in your CSV file
- Select the CSV file containing your data from your directory
- Click Import
NOTE: If you want to enter the remaining 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
- Click OK to close the results pop-up
- 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.
[Option 2] Generate values from new dimensioned Elements
- Include: select to add 'values generated from element data'
- The Compound Dimension Values section is empty until it is populated automatically after an element using this Dimension Value has been created
Create an element using this Dimension
- Create a Dimensioned element using the Compound Dimension. See Creating Dimensioned Metrics and Reports for more instructions.
- Fetch the data for your element. In the given example we use a SQL database as a Data Source, so wee 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.
- Save and update your element
Compound Dimension values are going to be automatically populated
Return to the compound dimension you have created in the first steps.
The Compound Dimension Values table should be populated with new values.