Add simple measures in bulk to a cube
When a cube’s fact table has many fact columns, and you need to create one or more simple measures for each column, you can create simple measures in bulk by defining criteria to select columns and apply an aggregation function to those columns.
Complete the following steps to add simple measures to a cube, in bulk:
Log into the Pentaho User Console (PUC).
Open the Semantic Model Editor by taking one of the following actions:
If you are using the Modern Design of PUC, in the menu on the left side of the page, click Semantic Model Editor.
If you are using the Classic Design of PUC, click File > Semantic Model Editor.
The Semantic Model Editor opens.
Open the semantic model that contains the cube to which you want to add measures to in bulk by completing the following sub steps:
In the Semantic Models list, navigate to the model you want to open by searching or scrolling through the list.
Click Open. The model opens in the canvas.
Select the cube you want to edit, and then click the Add a Measure icon. The Add a Measure dialog opens.
Select Add Simple Measure, and then click Confirm. The Add Measure dialog opens.
Select Bulk Measures. The Add Measure window opens with the Condition section displayed.
(Optional) To ensure that measure names are unique inside each cube, in the Name the Measures subsection, turn on the Use Custom Name toggle to display the Measure Name fields and then enter a prefix or suffix or both.
In the Select the Criteria subsection, select the Subject that the system should use as criteria when selecting columns during bulk measure creation. Subjects include:
All Columns: Considers all columns of the table.
Column Key: Selects among the table’s key columns (defined physically as Primary or Foreign Keys in the database) .
Column Type: Matches columns by the column type.
Column Name: Matches columns by using physical names (contains, starts with, ends with).
(Optional) If you selected a Subject that displays an additional option to configure in the Select the Criteria subsection, enter the information for that option:
SubjectOptionDescriptionColumn Key
Key Type*
The type of key that the system looks for when selecting columns during bulk measure creation. Key types include the following options:
All
Primary Key
Foreign Key
Column Type
Column Type*
The type of column that the system looks for when selecting columns during bulk measure creation. Types available to choose from are determined by the information in the cube’s fact table.
Column Name
Filter*
Filter option and text that the system uses to filter the columns by their name during bulk measure creation. Filter includes the following options:
Contains
Ends With
Starts With
* Required field
In the Define Aggregation subsection, edit or change the following options:
OptionDescriptionAggregation
Method used in reports for grouping and calculating data for each one of the new measures that will get created. Aggregation options include:
Average
Count
Distinct Count
Maximum
Minimum
Sum (default value)
Excluding Columns
List with the columns that you want the system to exclude from the bulk measure creation process. This list is populated with the fact table columns that matched the criteria previously defined for the bulk measure creation. Leave empty in case you don't want the system to exclude any.
Click Create. The measures are created and added to the Measures node inside the cube.
Click Save to save changes to the model.
Last updated
Was this helpful?

